Skip to content
Snippets Groups Projects
Commit 0f9838ce authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

ensure data is present before using it in Shib auth plugin, fixes #4616

Closes #4616

Merge request studip/studip!3429
parent e94126b1
No related branches found
No related tags found
No related merge requests found
...@@ -42,6 +42,7 @@ class StudipAuthShib extends StudipAuthSSO ...@@ -42,6 +42,7 @@ class StudipAuthShib extends StudipAuthSSO
$this->userdata = json_decode($auth, true); $this->userdata = json_decode($auth, true);
if ($this->userdata) {
if ($this->username_attribute !== 'username') { if ($this->username_attribute !== 'username') {
$this->userdata['username'] = $this->userdata[$this->username_attribute]; $this->userdata['username'] = $this->userdata[$this->username_attribute];
} }
...@@ -51,6 +52,7 @@ class StudipAuthShib extends StudipAuthSSO ...@@ -51,6 +52,7 @@ class StudipAuthShib extends StudipAuthSSO
} }
} }
} }
}
/** /**
* Return the current username. * Return the current username.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment