Skip to content

Commit

Permalink
Shibboleth authentication: Fixed bug MDL-18538 that overwrites altern…
Browse files Browse the repository at this point in the history
…ateloginurl when Shibboleth authentication settings are saved
  • Loading branch information
exe-cutor committed Mar 12, 2009
1 parent 7b1476e commit 37934e4
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions auth/shibboleth/auth.php
Expand Up @@ -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';
}

Expand Down

0 comments on commit 37934e4

Please sign in to comment.