If config wwwroot starts with 'https', ignore config loginhttps value.
Dependency: Bug #5647
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php if (substr($CFG->wwwroot, 0, 5) !== 'https') { /* https && loginhttps */ ?>
|
||||
<tr valign="top">
|
||||
<td align="right">loginhttps:</td>
|
||||
<td>
|
||||
@@ -40,6 +41,7 @@
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } /* end: https && loginhttps */ ?>
|
||||
|
||||
<tr valign="top"><td colspan="3"><hr noshade="noshade" size="1"></td></tr>
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user