Skip to content
Snippets Groups Projects
Commit cb7638cb authored by Dylan Donkersgoed's avatar Dylan Donkersgoed Committed by Hendrik Grahl
Browse files

Issue #2922609 by Dylan Donkersgoed: Seamless login causes redirect loops for blocked users

parent 9a9c89f4
No related branches found
No related tags found
No related merge requests found
......@@ -295,7 +295,7 @@ function ldap_sso_user_login_sso() {
watchdog('ldap_authentication', 'ldap_sso_user_login_sso.remote_user: uid of user=!uid', $watchdog_tokens, WATCHDOG_DEBUG);
}
if ($user && $user->uid > 0) {
if ($user && $user->uid > 0 && $user->status != 0) {
// Reload the account to ensure we have a fully populated user object.
$user = user_load($user->uid);
......@@ -320,6 +320,10 @@ function ldap_sso_user_login_sso() {
}
drupal_goto('<front>');
}
elseif ($user->status == 0) {
drupal_set_message(t('Your account is blocked.'), 'error');
drupal_goto('user/login');
}
else {
if ($auth_conf->seamlessLogin == 1) {
if ($detailed_watchdog_log) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment