Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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 1 changed file with 7 additions and 2 deletions. Show diff stats Hide diff stats

  1. +7 2 auth/shibboleth/auth.php
9 auth/shibboleth/auth.php
@@ -271,12 +271,17 @@ function process_config($config) {
271 271 set_config('auth_instructions', $config->auth_instructions, 'auth/shibboleth');
272 272 set_config('changepasswordurl', $config->changepasswordurl, 'auth/shibboleth');
273 273
  274 + // Overwrite alternative login URL if integrated WAYF is used
274 275 if (isset($config->alt_login) && $config->alt_login == 'on'){
275 276 set_config('alt_login', $config->alt_login, 'auth/shibboleth');
276 277 set_config('alternateloginurl', $CFG->wwwroot.'/auth/shibboleth/login.php');
277 278 } else {
278   - set_config('alt_login', 'off', 'auth/shibboleth');
279   - set_config('alternateloginurl', '');
  279 + // Check if integrated WAYF was enabled and is now turned off
  280 + // If it was and only then, reset the Moodle alternate URL
  281 + if ($this->config->alt_login == 'on'){
  282 + set_config('alt_login', 'off', 'auth/shibboleth');
  283 + set_config('alternateloginurl', '');
  284 + }
280 285 $config->alt_login = 'off';
281 286 }
282 287

0 comments on commit 37934e4

Please sign in to comment.
Something went wrong with that request. Please try again.