Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Shibboleth authentication: Fixed bug MDL-18538 that overwrites altern…

…ateloginurl when Shibboleth authentication settings are saved
  • Loading branch information...
commit 37934e49969fe93adae3a99b78007eb9d6fe3c46 1 parent 7b1476e
exe-cutor authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 auth/shibboleth/auth.php
9 auth/shibboleth/auth.php
View
@@ -271,12 +271,17 @@ function process_config($config) {
set_config('auth_instructions', $config->auth_instructions, 'auth/shibboleth');
set_config('changepasswordurl', $config->changepasswordurl, 'auth/shibboleth');
+ // Overwrite alternative login URL if integrated WAYF is used
if (isset($config->alt_login) && $config->alt_login == 'on'){
set_config('alt_login', $config->alt_login, 'auth/shibboleth');
set_config('alternateloginurl', $CFG->wwwroot.'/auth/shibboleth/login.php');
} else {
- set_config('alt_login', 'off', 'auth/shibboleth');
- set_config('alternateloginurl', '');
+ // Check if integrated WAYF was enabled and is now turned off
+ // If it was and only then, reset the Moodle alternate URL
+ if ($this->config->alt_login == 'on'){
+ set_config('alt_login', 'off', 'auth/shibboleth');
+ set_config('alternateloginurl', '');
+ }
$config->alt_login = 'off';
}
Please sign in to comment.
Something went wrong with that request. Please try again.