ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilUserCronCheckAccounts Class Reference
+ Inheritance diagram for ilUserCronCheckAccounts:
+ Collaboration diagram for ilUserCronCheckAccounts:

Public Member Functions

 getId ()
 Get id. More...
 
 getTitle ()
 Get title. More...
 
 getDescription ()
 Get description. More...
 
 getDefaultScheduleType ()
 Get schedule type. More...
 
 getDefaultScheduleValue ()
 Get schedule value. More...
 
 hasAutoActivation ()
 Is to be activated on "installation". More...
 
 hasFlexibleSchedule ()
 Can the schedule be configured? More...
 
- Public Member Functions inherited from ilCronJob
 isActive ($a_ts_last_run, $a_schedule_type, $a_schedule_value, $a_manual=false)
 Is job currently active? More...
 
 getScheduleType ()
 Get current schedule type (if flexible) More...
 
 getScheduleValue ()
 Get current schedule value (if flexible) More...
 
 setSchedule ($a_type, $a_value)
 Update current schedule (if flexible) More...
 
 getAllScheduleTypes ()
 Get all available schedule types. More...
 
 getScheduleTypesWithValues ()
 
 getValidScheduleTypes ()
 Returns a collection of all valid schedule types for a specific job. More...
 
 getTitle ()
 Get title. More...
 
 getDescription ()
 Get description. More...
 
 isManuallyExecutable ()
 Defines whether or not a cron job can be started manually. More...
 
 hasCustomSettings ()
 Has cron job any custom setting which can be edited? More...
 
 addCustomSettingsToForm (ilPropertyFormGUI $a_form)
 Add custom settings to form. More...
 
 saveCustomSettings (ilPropertyFormGUI $a_form)
 Save custom settings. More...
 
 addToExternalSettingsForm ($a_form_id, array &$a_fields, $a_is_active)
 Add external settings to form. More...
 
 activationWasToggled ($a_currently_active)
 Cron job status was changed. More...
 
 getId ()
 Get id. More...
 
 hasAutoActivation ()
 Is to be activated on "installation". More...
 
 hasFlexibleSchedule ()
 Can the schedule be configured? More...
 
 getDefaultScheduleType ()
 Get schedule type. More...
 
 getDefaultScheduleValue ()
 Get schedule value. More...
 
 run ()
 Run job. More...
 

Protected Member Functions

 txt ($language, $key, $module='common')
 
 checkNotConfirmedUserAccounts ()
 
- Protected Member Functions inherited from ilCronJob
 checkSchedule ($a_ts_last_run, $a_schedule_type, $a_schedule_value)
 

Protected Attributes

 $counter = 0
 

Additional Inherited Members

- Data Fields inherited from ilCronJob
const SCHEDULE_TYPE_DAILY = 1
 
const SCHEDULE_TYPE_IN_MINUTES = 2
 
const SCHEDULE_TYPE_IN_HOURS = 3
 
const SCHEDULE_TYPE_IN_DAYS = 4
 
const SCHEDULE_TYPE_WEEKLY = 5
 
const SCHEDULE_TYPE_MONTHLY = 6
 
const SCHEDULE_TYPE_QUARTERLY = 7
 
const SCHEDULE_TYPE_YEARLY = 8
 

Detailed Description

Definition at line 14 of file class.ilUserCronCheckAccounts.php.

Member Function Documentation

◆ checkNotConfirmedUserAccounts()

ilUserCronCheckAccounts::checkNotConfirmedUserAccounts ( )
protected

Definition at line 136 of file class.ilUserCronCheckAccounts.php.

137 {
138 global $DIC;
139
140 $ilDB = $DIC['ilDB'];
141 $ilLog = $DIC['ilLog'];
142
143 require_once 'Services/Registration/classes/class.ilRegistrationSettings.php';
144 $oRegSettigs = new ilRegistrationSettings();
145
146 $query = 'SELECT usr_id FROM usr_data '
147 . 'WHERE (reg_hash IS NOT NULL AND reg_hash != %s)'
148 . 'AND active = %s '
149 . 'AND create_date < %s';
150 $res = $ilDB->queryF(
151 $query,
152 array('text', 'integer', 'timestamp'),
153 array('', 0, date('Y-m-d H:i:s', time() - (int) $oRegSettigs->getRegistrationHashLifetime()))
154 );
155 while ($row = $ilDB->fetchAssoc($res)) {
156 $oUser = ilObjectFactory::getInstanceByObjId((int) $row['usr_id']);
157 $oUser->delete();
158 $ilLog->write('Cron: Deleted ' . $oUser->getLogin() . ' [' . $oUser->getId() . '] ' . __METHOD__);
159
160 $this->counter++;
161 }
162 }
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
Class ilObjAuthSettingsGUI.
$row
$query
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
global $ilDB

References $DIC, $ilDB, $ilLog, $query, $res, $row, and ilObjectFactory\getInstanceByObjId().

+ Here is the call graph for this function:

◆ getDefaultScheduleType()

ilUserCronCheckAccounts::getDefaultScheduleType ( )

Get schedule type.

Returns
int

Reimplemented from ilCronJob.

Definition at line 41 of file class.ilUserCronCheckAccounts.php.

42 {
44 }
const SCHEDULE_TYPE_DAILY

References ilCronJob\SCHEDULE_TYPE_DAILY.

◆ getDefaultScheduleValue()

ilUserCronCheckAccounts::getDefaultScheduleValue ( )

Get schedule value.

Returns
int|array

Reimplemented from ilCronJob.

Definition at line 46 of file class.ilUserCronCheckAccounts.php.

47 {
48 return;
49 }

◆ getDescription()

ilUserCronCheckAccounts::getDescription ( )

Get description.

Returns
string

Reimplemented from ilCronJob.

Definition at line 32 of file class.ilUserCronCheckAccounts.php.

33 {
34 global $DIC;
35
36 $lng = $DIC['lng'];
37
38 return $lng->txt("check_user_accounts_desc");
39 }
$lng

References $DIC, and $lng.

◆ getId()

ilUserCronCheckAccounts::getId ( )

Get id.

Returns
string

Reimplemented from ilCronJob.

Definition at line 18 of file class.ilUserCronCheckAccounts.php.

19 {
20 return "user_check_accounts";
21 }

◆ getTitle()

ilUserCronCheckAccounts::getTitle ( )

Get title.

Returns
string

Reimplemented from ilCronJob.

Definition at line 23 of file class.ilUserCronCheckAccounts.php.

24 {
25 global $DIC;
26
27 $lng = $DIC['lng'];
28
29 return $lng->txt("check_user_accounts");
30 }

References $DIC, and $lng.

◆ hasAutoActivation()

ilUserCronCheckAccounts::hasAutoActivation ( )

Is to be activated on "installation".

Returns
boolean

Reimplemented from ilCronJob.

Definition at line 51 of file class.ilUserCronCheckAccounts.php.

52 {
53 return false;
54 }

◆ hasFlexibleSchedule()

ilUserCronCheckAccounts::hasFlexibleSchedule ( )

Can the schedule be configured?

Returns
boolean

Reimplemented from ilCronJob.

Definition at line 56 of file class.ilUserCronCheckAccounts.php.

57 {
58 return false;
59 }

◆ txt()

ilUserCronCheckAccounts::txt (   $language,
  $key,
  $module = 'common' 
)
protected

Definition at line 130 of file class.ilUserCronCheckAccounts.php.

131 {
132 include_once 'Services/Language/classes/class.ilLanguage.php';
134 }
static _lookupEntry($a_lang_key, $a_mod, $a_id)
$key
Definition: croninfo.php:18
if($modEnd===false) $module
Definition: module.php:59

References $key, $language, $module, and ilLanguage\_lookupEntry().

+ Here is the call graph for this function:

Field Documentation

◆ $counter

ilUserCronCheckAccounts::$counter = 0
protected

Definition at line 16 of file class.ilUserCronCheckAccounts.php.


The documentation for this class was generated from the following file: