From 91b4db678dec332a49a3d6a1541b1d6d25b2bfaf Mon Sep 17 00:00:00 2001 From: curiosity Date: Wed, 13 Nov 2024 13:11:37 +0100 Subject: [PATCH] remove shibboleth check in timechecker --- userstatus/timechecker/classes/timechecker.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/userstatus/timechecker/classes/timechecker.php b/userstatus/timechecker/classes/timechecker.php index d25a606..04b9203 100644 --- a/userstatus/timechecker/classes/timechecker.php +++ b/userstatus/timechecker/classes/timechecker.php @@ -63,8 +63,7 @@ public function get_to_suspend() { $users = $DB->get_records_sql( "SELECT id, suspended, lastaccess, username, deleted FROM {user} - WHERE auth = 'shibboleth' - AND suspended = 0 + WHERE suspended = 0 AND deleted = 0 AND lastaccess != 0 AND lastaccess < :timelimit", @@ -102,8 +101,7 @@ public function get_never_logged_in() { "SELECT u.id, u.suspended, u.lastaccess, u.username, u.deleted FROM {user} u LEFT JOIN {tool_cleanupusers} tc ON u.id = tc.id - WHERE u.auth = 'shibboleth' - AND u.lastaccess = 0 + WHERE u.lastaccess = 0 AND u.deleted = 0 AND tc.id IS NULL" ); @@ -138,8 +136,7 @@ public function get_to_delete() { FROM {user} u JOIN {tool_cleanupusers} tc ON u.id = tc.id JOIN {tool_cleanupusers_archive} tca ON u.id = tca.id - WHERE u.auth = 'shibboleth' - AND u.suspended = 1 + WHERE u.suspended = 1 AND u.deleted = 0 AND tc.timestamp < :timelimit", [ @@ -181,8 +178,7 @@ public function get_to_reactivate() { FROM {user} u JOIN {tool_cleanupusers} tc ON u.id = tc.id JOIN {tool_cleanupusers_archive} tca ON u.id = tca.id - WHERE u.auth = 'shibboleth' - AND u.suspended = 1 + WHERE u.suspended = 1 AND u.deleted = 0 AND tca.lastaccess >= :timelimit AND tca.username NOT IN