From 8026b290bdd773822a7999a841b57b513f651190 Mon Sep 17 00:00:00 2001 From: Danny <danny.bollaert@gmail.com> Date: Thu, 20 Dec 2018 18:01:10 +0100 Subject: [PATCH] The preselect param is not being saved in the state. + small spelling mistakes (#1021) --- modules/multiauth/lib/Auth/Source/MultiAuth.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/multiauth/lib/Auth/Source/MultiAuth.php b/modules/multiauth/lib/Auth/Source/MultiAuth.php index 0ed573018..c25f85ba5 100644 --- a/modules/multiauth/lib/Auth/Source/MultiAuth.php +++ b/modules/multiauth/lib/Auth/Source/MultiAuth.php @@ -130,6 +130,10 @@ class MultiAuth extends \SimpleSAML\Auth\Source $state[self::AUTHID] = $this->authId; $state[self::SOURCESID] = $this->sources; + if (!\array_key_exists('multiauth:preselect', $state) && is_string($this->preselect)) { + $state['multiauth:preselect'] = $this->preselect; + } + // Save the $state array, so that we can restore if after a redirect $id = \SimpleSAML\Auth\State::saveState($state, self::STAGEID); @@ -139,11 +143,7 @@ class MultiAuth extends \SimpleSAML\Auth\Source $url = \SimpleSAML\Module::getModuleURL('multiauth/selectsource.php'); $params = ['AuthState' => $id]; - if (!\array_key_exists('multiauth:preselect', $state) && is_string($this->preselect)) { - $state['multiauth:preselect'] = $this->preselect; - } - - // Allowes the user to specify the auth souce to be used + // Allows the user to specify the auth source to be used if (isset($_GET['source'])) { $params['source'] = $_GET['source']; } -- GitLab