diff --git a/enrol/authorize/config.html b/enrol/authorize/config.html index 96a69a96acf..43d5dc592c7 100755 --- a/enrol/authorize/config.html +++ b/enrol/authorize/config.html @@ -28,6 +28,7 @@ +wwwroot, 0, 5) !== 'https') { /* https && loginhttps */ ?> loginhttps: @@ -40,6 +41,7 @@ ?> +
diff --git a/enrol/authorize/enrol.php b/enrol/authorize/enrol.php index 9ed2a73213d..cec2adc7b57 100755 --- a/enrol/authorize/enrol.php +++ b/enrol/authorize/enrol.php @@ -345,8 +345,8 @@ class enrolment_plugin extends enrolment_base { if (empty($frm->an_tran_key) && empty($frm->an_password)) { notify("an_tran_key or an_password required"); } - if (empty($CFG->loginhttps)) { - notify("\$CFG->loginhttps must be ON"); + if (empty($CFG->loginhttps) and substr($CFG->wwwroot, 0, 5) !== 'https') { + notify("loginhttps must be ON"); } } @@ -360,8 +360,8 @@ class enrolment_plugin extends enrolment_base { function process_config($config) { global $CFG; - if (empty($CFG->loginhttps) || !$this->check_openssl_loaded()) - { + if ((empty($CFG->loginhttps) and substr($CFG->wwwroot, 0, 5) !== 'https') || + !$this->check_openssl_loaded()) { return false; }