diff --git a/admin/registration/confirmregistration.php b/admin/registration/confirmregistration.php index ff99680ac8b..6a1ed49da52 100644 --- a/admin/registration/confirmregistration.php +++ b/admin/registration/confirmregistration.php @@ -45,7 +45,7 @@ $error = optional_param('error', '', PARAM_ALPHANUM); admin_externalpage_setup('registrationmoodleorg'); -if ($url !== HUB_MOODLEORGHUBURL) { +if (parse_url($url, PHP_URL_HOST) !== parse_url(HUB_MOODLEORGHUBURL, PHP_URL_HOST)) { // Allow other plugins to confirm registration on custom hubs. Plugins implementing this // callback need to redirect or exit. See https://docs.moodle.org/en/Hub_registration . $callbacks = get_plugins_with_function('hub_registration'); diff --git a/admin/registration/renewregistration.php b/admin/registration/renewregistration.php index bc05da60ffe..99a27647e8f 100644 --- a/admin/registration/renewregistration.php +++ b/admin/registration/renewregistration.php @@ -39,7 +39,7 @@ $token = optional_param('token', '', PARAM_TEXT); admin_externalpage_setup('registrationmoodleorg'); -if ($url !== HUB_MOODLEORGHUBURL) { +if (parse_url($url, PHP_URL_HOST) !== parse_url(HUB_MOODLEORGHUBURL, PHP_URL_HOST)) { // Allow other plugins to renew registration on custom hubs. Plugins implementing this // callback need to redirect or exit. See https://docs.moodle.org/en/Hub_registration . $callbacks = get_plugins_with_function('hub_registration');