ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilUserCronCheckAccounts Class Reference
+ Inheritance diagram for ilUserCronCheckAccounts:
+ Collaboration diagram for ilUserCronCheckAccounts:

Public Member Functions

 getId ()
 
 getTitle ()
 
 getDescription ()
 
 getDefaultScheduleType ()
 
 getDefaultScheduleValue ()
 
 hasAutoActivation ()
 
 hasFlexibleSchedule ()
 
- 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...
 
 getValidScheduleTypes ()
 Get all available schedule types. 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 128 of file class.ilUserCronCheckAccounts.php.

References $ilDB, $ilLog, $query, $res, $row, array, date, ilObjectFactory\getInstanceByObjId(), and time.

Referenced by hasFlexibleSchedule().

129  {
130  global $ilDB, $ilLog;
131 
132  require_once 'Services/Registration/classes/class.ilRegistrationSettings.php';
133  $oRegSettigs = new ilRegistrationSettings();
134 
135  $query = 'SELECT usr_id FROM usr_data '
136  . 'WHERE reg_hash IS NOT NULL '
137  . 'AND active = %s '
138  . 'AND create_date < %s';
139  $res = $ilDB->queryF(
140  $query,
141  array('integer', 'timestamp'),
142  array(0, date('Y-m-d H:i:s', time() - (int) $oRegSettigs->getRegistrationHashLifetime()))
143  );
144  while ($row = $ilDB->fetchAssoc($res)) {
145  $oUser = ilObjectFactory::getInstanceByObjId((int) $row['usr_id']);
146  $oUser->delete();
147  $ilLog->write('Cron: Deleted ' . $oUser->getLogin() . ' [' . $oUser->getId() . '] ' . __METHOD__);
148 
149  $this->counter++;
150  }
151  }
foreach($_POST as $key=> $value) $res
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
$query
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.
global $ilDB
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getDefaultScheduleType()

ilUserCronCheckAccounts::getDefaultScheduleType ( )

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

38  {
39  return self::SCHEDULE_TYPE_DAILY;
40  }

◆ getDefaultScheduleValue()

ilUserCronCheckAccounts::getDefaultScheduleValue ( )

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

43  {
44  return;
45  }

◆ getDescription()

ilUserCronCheckAccounts::getDescription ( )

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

References $lng.

31  {
32  global $lng;
33 
34  return $lng->txt("check_user_accounts_desc");
35  }
global $lng
Definition: privfeed.php:17

◆ getId()

ilUserCronCheckAccounts::getId ( )

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

19  {
20  return "user_check_accounts";
21  }

◆ getTitle()

ilUserCronCheckAccounts::getTitle ( )

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

References $lng.

24  {
25  global $lng;
26 
27  return $lng->txt("check_user_accounts");
28  }
global $lng
Definition: privfeed.php:17

◆ hasAutoActivation()

ilUserCronCheckAccounts::hasAutoActivation ( )

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

48  {
49  return false;
50  }

◆ hasFlexibleSchedule()

ilUserCronCheckAccounts::hasFlexibleSchedule ( )

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

References $data, $GLOBALS, $ilDB, $ilLog, $lng, $query, $res, $result, $row, checkNotConfirmedUserAccounts(), ilCronJob\run(), ilCronJobResult\STATUS_NO_ACTION, ilCronJobResult\STATUS_OK, time, and txt().

53  {
54  return false;
55  }
+ Here is the call graph for this function:

◆ txt()

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

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

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

Referenced by hasFlexibleSchedule().

123  {
124  include_once 'Services/Language/classes/class.ilLanguage.php';
125  return ilLanguage::_lookupEntry($language, $module, $key);
126  }
static _lookupEntry($a_lang_key, $a_mod, $a_id)
if($modEnd===false) $module
Definition: module.php:59
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:
+ Here is the caller 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: