29 return "user_check_accounts";
38 return $lng->txt(
"check_user_accounts");
47 return $lng->txt(
"check_user_accounts_desc");
52 return self::SCHEDULE_TYPE_DAILY;
76 $ilLog = $DIC[
'ilLog'];
81 $two_weeks_in_seconds = $now + (60 * 60 * 24 * 14);
84 $query =
"SELECT usr_id, login, time_limit_until " .
86 "WHERE time_limit_message = '0' " .
87 "AND time_limit_unlimited = '0' " .
88 "AND time_limit_from < " .
$ilDB->quote($now,
"integer") .
" " .
89 "AND time_limit_until > " .
$ilDB->quote($now,
"integer") .
" " .
90 "AND time_limit_until < " .
$ilDB->quote($two_weeks_in_seconds,
"integer");
95 $senderFactory =
$GLOBALS[
'DIC'][
"mail.mime.sender.factory"];
96 $sender = $senderFactory->system();
99 $expires = $row->time_limit_until;
100 $login = $row->login;
101 $usr_id = $row->usr_id;
104 $lng->loadLanguageModule(
'mail');
108 $body = $salutation .
"\n\n";
110 $lng->txt(
'account_expires_body'),
113 strftime(
'%Y-%m-%d %R', $expires)
124 $lng->txt(
'account_expires_subject'),
130 $query =
"UPDATE usr_data SET time_limit_message = '1' WHERE usr_id = '" . $usr_id .
"'";
131 $ilDB->query($query);
134 $ilLog->write(
'Cron: (checkUserAccounts()) sent message to ' . $login .
'.');
141 if ($this->counter) {
145 $result->setStatus($status);
153 string $module =
'common' 162 $ilDB = $DIC[
'ilDB'];
163 $ilLog = $DIC[
'ilLog'];
167 $query =
'SELECT usr_id FROM usr_data ' 168 .
'WHERE (reg_hash IS NOT NULL AND reg_hash != %s)' 170 .
'AND create_date < %s';
173 array(
'text',
'integer',
'timestamp'),
174 array(
'', 0, date(
'Y-m-d H:i:s', time() - $oRegSettigs->getRegistrationHashLifetime()))
179 $ilLog->write(
'Cron: Deleted ' . $oUser->getLogin() .
' [' . $oUser->getId() .
'] ' . __METHOD__);
txt(string $language, string $key, string $module='common')
checkNotConfirmedUserAccounts()
static _getLanguageOfUser(int $a_usr_id)
Get language object of user.
static getSalutation(int $a_usr_id, ?ilLanguage $a_language=null)
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
Class ilObjAuthSettingsGUI.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getAutoGeneratedMessageString(ilLanguage $lang=null)
static _lookupEntry(string $a_lang_key, string $a_mod, string $a_id)
static _lookupEmail(int $a_user_id)
getDefaultScheduleValue()