From 98c38993fd6cbd78bf5819c68c55fcfded6467c0 Mon Sep 17 00:00:00 2001 From: Marina Glancy Date: Fri, 1 May 2015 22:21:43 +0800 Subject: [PATCH] MDL-50090 user: suspended user can login upon conrimation --- login/confirm.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/login/confirm.php b/login/confirm.php index ba059694cdc..64e5fa83fa8 100644 --- a/login/confirm.php +++ b/login/confirm.php @@ -77,12 +77,14 @@ if (!empty($data) || (!empty($p) && !empty($s))) { print_error('cannotfinduser', '', '', s($username)); } - complete_user_login($user); - - if ( ! empty($SESSION->wantsurl) ) { // Send them where they were going - $goto = $SESSION->wantsurl; - unset($SESSION->wantsurl); - redirect($goto); + 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); + } } $PAGE->navbar->add(get_string("confirmed")); -- 2.11.4.GIT