34 $query =
"SELECT usr_id,ts FROM " . self::TABLE_NAME;
35 $res = $this->db->queryF($query, [
44 $lastReminderSent = (
int) $row->ts;
45 if ($lastLoginUnixtime >= $lastReminderSent) {
54 int $time_frame_for_deletion
56 $query =
"SELECT ts FROM " . self::TABLE_NAME .
" WHERE usr_id = %s";
57 $res = $this->db->queryF($query, [
'integer'], [$user->
getId()]);
59 if ($row ===
false || $row->ts ===
null) {
60 $this->
sendReminder($user, $reminderTime, $time_frame_for_deletion);
69 $this->db->manipulate(
"DELETE FROM " . self::TABLE_NAME);
74 $query =
"DELETE FROM " . self::TABLE_NAME .
" WHERE usr_id = %s";
75 $this->db->manipulateF($query, [
'integer'], [$usr_id]);
80 $this->db->manipulateF(
81 "INSERT INTO " . self::TABLE_NAME .
" (usr_id, ts) VALUES (%s, %s)",
96 int $time_frame_for_deletion
99 $mail->setRecipients([$user]);
100 $mail->setAdditionalInformation(
103 "days" => $reminderTime,
104 "date" => $time_frame_for_deletion
if(!file_exists('../ilias.ini.php'))
static _lookupLastLogin(int $a_user_id)
sendReminder(ilObjUser $user, int $reminderTime, int $time_frame_for_deletion)
removeEntriesFromTableIfLastLoginIsNewer()
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
persistMailSent(int $usr_id)
__construct(private ilDBInterface $db)
removeSingleUserFromTable(int $usr_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
sendReminderMailIfNeeded(ilObjUser $user, int $reminderTime, int $time_frame_for_deletion)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...