Skip to content
Snippets Groups Projects
Commit ef877b7e authored by André Noack's avatar André Noack
Browse files

Resolve "SSO Login fragt getUser() ab, aber es gibt u.U. keinen Stud.IP Nutzer dazu"

Closes #3058

Merge request studip/studip!2045
parent 3f2d859d
No related branches found
No related tags found
No related merge requests found
...@@ -261,9 +261,8 @@ class Seminar_Auth ...@@ -261,9 +261,8 @@ class Seminar_Auth
// then do login // then do login
if (($authplugin = StudipAuthAbstract::GetInstance($provider))) { if (($authplugin = StudipAuthAbstract::GetInstance($provider))) {
$authplugin->authenticateUser('', ''); $user = $authplugin->authenticateUser('', '');
if ($authplugin->getUser()) { if ($user) {
$user = $authplugin->getStudipUser($authplugin->getUser());
if ($user->isExpired()) { if ($user->isExpired()) {
throw new AccessDeniedException(_('Dieses Benutzerkonto ist abgelaufen. Wenden Sie sich bitte an die Administration.')); throw new AccessDeniedException(_('Dieses Benutzerkonto ist abgelaufen. Wenden Sie sich bitte an die Administration.'));
} }
...@@ -279,6 +278,8 @@ class Seminar_Auth ...@@ -279,6 +278,8 @@ class Seminar_Auth
Metrics::increment('core.sso_login.succeeded'); Metrics::increment('core.sso_login.succeeded');
return $user->id; return $user->id;
} else {
PageLayout::postMessage(MessageBox::error($authplugin->plugin_name . ': ' . _('Login fehlgeschlagen'), $authplugin->error_msg ? [$authplugin->error_msg] : []),md5($authplugin->error_msg));
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment