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
100 $mail->setAdditionalInformation(
103 "days" => $reminderTime,
104 "date" => $time_frame_for_deletion
108 $this->persistMailSent($user->
getId());
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
sendReminder(ilObjUser $user, int $reminderTime, int $time_frame_for_deletion)
sendReminderMailIfNeeded(ilObjUser $user, int $reminderTime, int $time_frame_for_deletion)
__construct(private ilDBInterface $db)
persistMailSent(int $usr_id)
removeEntriesFromTableIfLastLoginIsNewer()
removeSingleUserFromTable(int $usr_id)
setRecipients(array $a_rcp)
static _lookupLastLogin(int $a_user_id)
if(!file_exists('../ilias.ini.php'))