diff options
| author | Elmar Ludwig <elmar.ludwig@uni-osnabrueck.de> | 2025-05-08 10:23:19 +0200 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2025-05-16 10:11:40 +0200 |
| commit | 390535125aaa6b5c6533adfc5f312713f4aeec98 (patch) | |
| tree | 44de1b67365ba1b750bc23da12bb32629d42e29c /lib | |
| parent | 48b8c23c6392c3d1d8b671a63c9269a0a0f5e3f5 (diff) | |
make `domain` optional in StudipAuthOIDC, fixes #5592
Closes #5592
Merge request studip/studip!4213
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/classes/auth_plugins/StudipAuthOIDC.class.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/classes/auth_plugins/StudipAuthOIDC.class.php b/lib/classes/auth_plugins/StudipAuthOIDC.class.php index 7071e90..57d176a 100644 --- a/lib/classes/auth_plugins/StudipAuthOIDC.class.php +++ b/lib/classes/auth_plugins/StudipAuthOIDC.class.php @@ -76,8 +76,10 @@ class StudipAuthOIDC extends StudipAuthSSO { $this->getClient()->authenticate(); $this->userdata = (array) $this->getClient()->requestUserInfo(); - if (isset($this->userdata['sub'])) { + if (isset($this->userdata['sub'], $this->domain)) { return $this->userdata['username'] = $this->userdata['sub'] . '@' . $this->domain; + } else if (isset($this->userdata['sub'])) { + return $this->userdata['username'] = $this->userdata['sub']; } else { return null; } |
