MDL-50090 user: suspended user can login upon conrimation

This commit is contained in:
Marina Glancy
2015-05-06 11:02:26 +08:00
committed by David Monllao
parent 28947c1d7d
commit 78ec6751fc
+7 -5
View File
@@ -77,12 +77,14 @@ if (!empty($data) || (!empty($p) && !empty($s))) {
print_error('cannotfinduser', '', '', s($username));
}
complete_user_login($user);
if (!$user->suspended) {
complete_user_login($user);
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"));