From cf36da6429282dc1f4f1ff608ac85d15e4aeb45c Mon Sep 17 00:00:00 2001 From: moodler Date: Tue, 24 Oct 2006 07:07:54 +0000 Subject: [PATCH] FIxed problem which was unenrolling some assigns at the site level! MDL-7189 --- lib/datalib.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/datalib.php b/lib/datalib.php index 9d286ebea4..1ec373fe86 100644 --- a/lib/datalib.php +++ b/lib/datalib.php @@ -320,7 +320,7 @@ function get_users_unconfirmed($cutofftime=2000000000) { FROM {$CFG->prefix}user WHERE confirmed = 0 AND firstaccess > 0 - AND firstaccess < '$cutofftime'"); + AND firstaccess < $cutofftime"); } /** @@ -334,8 +334,9 @@ function get_users_longtimenosee($cutofftime) { global $CFG; return get_records_sql("SELECT userid as id, courseid FROM {$CFG->prefix}user_lastaccess - WHERE timeaccess > '0' - AND timeaccess < '$cutofftime' "); + WHERE courseid != ".SITEID." + AND timeaccess > 0 + AND timeaccess < $cutofftime "); } /** @@ -352,7 +353,7 @@ function get_users_not_fully_set_up($cutofftime=2000000000) { FROM {$CFG->prefix}user WHERE confirmed = 1 AND lastaccess > 0 - AND lastaccess < '$cutofftime' + AND lastaccess < $cutofftime AND deleted = 0 AND (lastname = '' OR firstname = '' OR email = '')"); } -- 2.39.5