From 5c22eb31dafc79138159a86648041eff3b1b3ad9 Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Tue, 22 Mar 2016 17:13:45 -0500 Subject: [PATCH] Fix issue deleting users - refs #8140 --- main/inc/lib/usermanager.lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/inc/lib/usermanager.lib.php b/main/inc/lib/usermanager.lib.php index 787293a119..964aeeb4a5 100755 --- a/main/inc/lib/usermanager.lib.php +++ b/main/inc/lib/usermanager.lib.php @@ -489,11 +489,11 @@ class UserManager return false; } $sql = "SELECT * FROM $table_course_user - WHERE status = '1' AND id = '".$user_id."'"; + WHERE status = 1 AND user_id = ".$user_id; $res = Database::query($sql); while ($course = Database::fetch_object($res)) { $sql = "SELECT id FROM $table_course_user - WHERE status='1' AND c_id ='".Database::escape_string($course->c_id)."'"; + WHERE status=1 AND c_id = " . Database::escape_string($course->c_id); $res2 = Database::query($sql); if (Database::num_rows($res2) == 1) { return false;