Skip to content

Commit

Permalink
remove shibboleth check in timechecker
Browse files Browse the repository at this point in the history
  • Loading branch information
my-curiosity committed Nov 13, 2024
1 parent ac1c304 commit 91b4db6
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions userstatus/timechecker/classes/timechecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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"
);
Expand Down Expand Up @@ -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",
[
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 91b4db6

Please sign in to comment.