◆ checkNotConfirmedUserAccounts()
ilUserCronCheckAccounts::checkNotConfirmedUserAccounts |
( |
| ) |
|
|
protected |
Definition at line 126 of file class.ilUserCronCheckAccounts.php.
References $ilDB, $ilLog, $query, $res, $row, array, date, ilObjectFactory\getInstanceByObjId(), and time.
Referenced by run().
130 require_once
'Services/Registration/classes/class.ilRegistrationSettings.php';
133 $query =
'SELECT usr_id FROM usr_data ' 134 .
'WHERE reg_hash IS NOT NULL ' 136 .
'AND create_date < %s';
137 $res = $ilDB->queryF(
139 array(
'integer',
'timestamp'),
140 array(0,
date(
'Y-m-d H:i:s',
time() - (
int)$oRegSettigs->getRegistrationHashLifetime()))
142 while(
$row = $ilDB->fetchAssoc(
$res))
146 $ilLog->write(
'Cron: Deleted '.$oUser->getLogin().
' ['.$oUser->getId().
'] '.__METHOD__);
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
Create styles array
The data for the language used.
Class ilObjAuthSettingsGUI.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
◆ getDefaultScheduleType()
ilUserCronCheckAccounts::getDefaultScheduleType |
( |
| ) |
|
◆ getDefaultScheduleValue()
ilUserCronCheckAccounts::getDefaultScheduleValue |
( |
| ) |
|
◆ getDescription()
ilUserCronCheckAccounts::getDescription |
( |
| ) |
|
◆ getId()
ilUserCronCheckAccounts::getId |
( |
| ) |
|
◆ getTitle()
ilUserCronCheckAccounts::getTitle |
( |
| ) |
|
◆ hasAutoActivation()
ilUserCronCheckAccounts::hasAutoActivation |
( |
| ) |
|
◆ hasFlexibleSchedule()
ilUserCronCheckAccounts::hasFlexibleSchedule |
( |
| ) |
|
◆ run()
ilUserCronCheckAccounts::run |
( |
| ) |
|
Definition at line 57 of file class.ilUserCronCheckAccounts.php.
References $data, $ilDB, $ilLog, $lng, $query, $res, $result, $row, checkNotConfirmedUserAccounts(), ilCronJobResult\STATUS_NO_ACTION, ilCronJobResult\STATUS_OK, time, and txt().
64 $two_weeks_in_seconds = $now + (60 * 60 * 24 * 14);
67 $query =
"SELECT * FROM usr_data,usr_pref ".
68 "WHERE time_limit_message = '0' ".
69 "AND time_limit_unlimited = '0' ".
70 "AND time_limit_from < ".$ilDB->quote($now,
"integer").
" ".
71 "AND time_limit_until > ".$ilDB->quote($now,
"integer").
" ".
72 "AND time_limit_until < ".$ilDB->quote($two_weeks_in_seconds,
"integer").
" ".
73 "AND usr_data.usr_id = usr_pref.usr_id ".
74 "AND keyword = ".$ilDB->quote(
"language",
"text");
76 $res = $ilDB->query($query);
78 while(
$row = $ilDB->fetchObject(
$res))
80 include_once
'Services/Mail/classes/class.ilMimeMail.php';
82 $data[
'expires'] =
$row->time_limit_until;
92 $mail->From(
'noreply');
93 $mail->To(
$data[
'email']);
94 $mail->Subject($this->
txt(
$data[
'language'],
'account_expires_subject'),
true);
95 $mail->Body($this->
txt(
$data[
'language'],
'account_expires_body').
" ".strftime(
'%Y-%m-%d %R',
$data[
'expires']));
99 $query =
"UPDATE usr_data SET time_limit_message = '1' WHERE usr_id = '".$data[
'usr_id'].
"'";
100 $ilDB->query($query);
103 $ilLog->write(
'Cron: (checkUserAccounts()) sent message to '.
$data[
'login'].
'.');
txt($language, $key, $module='common')
checkNotConfirmedUserAccounts()
this class encapsulates the PHP mail() function.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
Cron job result data container.
◆ txt()
ilUserCronCheckAccounts::txt |
( |
|
$language, |
|
|
|
$key, |
|
|
|
$module = 'common' |
|
) |
| |
|
protected |
◆ $counter
ilUserCronCheckAccounts::$counter = 0 |
|
protected |
The documentation for this class was generated from the following file: