Skip to content

Commit

Permalink
MDL-50090 user: suspended user can login upon conrimation
Browse files Browse the repository at this point in the history
  • Loading branch information
marinaglancy authored and David Monllao committed May 6, 2015
1 parent c4a1502 commit f236dcc
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions login/confirm.php
Expand Up @@ -77,14 +77,16 @@
print_error('cannotfinduser', '', '', s($username));
}

complete_user_login($user);
if (!$user->suspended) {
complete_user_login($user);

\core\session\manager::apply_concurrent_login_limit($user->id, session_id());
\core\session\manager::apply_concurrent_login_limit($user->id, session_id());

if ( ! empty($SESSION->wantsurl) ) { // Send them where they were going
$goto = $SESSION->wantsurl;
unset($SESSION->wantsurl);
redirect($goto);
if ( ! empty($SESSION->wantsurl) ) { // Send them where they were going.
$goto = $SESSION->wantsurl;
unset($SESSION->wantsurl);
redirect($goto);
}
}

$PAGE->navbar->add(get_string("confirmed"));
Expand Down

0 comments on commit f236dcc

Please sign in to comment.