4 include_once
'Services/Mail/classes/class.ilMailNotification.php';
19 $ilDB->manipulateF(
"INSERT INTO " . self::TABLE_NAME .
" (usr_id, ts) VALUES (%s, %s)",
33 include_once
'Services/User/classes/class.ilCronDeleteInactiveUserReminderMailNotification.php';
35 $mail->setRecipients(
array($user));
36 $mail->setAdditionalInformation(
39 "days" => $reminderTime,
40 "date" => $time_frame_for_deletion
44 self::mailSent($user->
getId());
50 $query =
"SELECT usr_id,ts FROM " . self::TABLE_NAME;
61 $lastReminderSent = (int)
$row->ts;
62 if($lastLoginUnixtime >= $lastReminderSent)
64 self::removeSingleUserFromTable(
$row->usr_id);
72 $query =
"SELECT ts FROM " . self::TABLE_NAME .
" WHERE usr_id = %s";
77 self::sendReminder($user, $reminderTime, $time_frame_for_deletion);
86 $ilDB->manipulate(
"DELETE FROM " . self::TABLE_NAME);
92 $query =
"DELETE FROM " . self::TABLE_NAME .
" WHERE usr_id = %s";
static removeEntriesFromTableIfLastLoginIsNewer()
static sendReminder(ilObjUser $user, $reminderTime, $time_frame_for_deletion)
static checkIfReminderMailShouldBeSend(ilObjUser $user, $reminderTime, $time_frame_for_deletion)
getId()
get object id public
Create styles array
The data for the language used.
static removeSingleUserFromTable($usr_id)
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
static _lookupLastLogin($a_user_id)
lookup last login