This cron send notifications about expiring user accounts.  
 More...
 | 
|   | getId () | 
|   | 
|   | getTitle () | 
|   | 
|   | getDescription () | 
|   | 
|   | getDefaultScheduleType () | 
|   | 
|   | getDefaultScheduleValue () | 
|   | 
|   | hasAutoActivation () | 
|   | 
|   | hasFlexibleSchedule () | 
|   | 
|   | run () | 
|   | 
|   | setDateTimeProvider (?Closure $date_time_provider) | 
|   | 
|   | isDue (?DateTimeImmutable $last_run, ?CronJobScheduleType $schedule_type, ?int $schedule_value, bool $is_manually_executed=false) | 
|   | 
|   | getScheduleType () | 
|   | Get current schedule type (if flexible)  More...
  | 
|   | 
|   | getScheduleValue () | 
|   | Get current schedule value (if flexible)  More...
  | 
|   | 
|   | setSchedule (?CronJobScheduleType $a_type, ?int $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...
  | 
|   | 
|   | isManuallyExecutable () | 
|   | 
|   | hasCustomSettings () | 
|   | 
|   | addCustomSettingsToForm (ilPropertyFormGUI $a_form) | 
|   | 
|   | saveCustomSettings (ilPropertyFormGUI $a_form) | 
|   | 
|   | addToExternalSettingsForm (int $a_form_id, array &$a_fields, bool $a_is_active) | 
|   | 
|   | activationWasToggled (ilDBInterface $db, ilSetting $setting, bool $a_currently_active) | 
|   | Important: This method is (also) called from the setup process, where the constructor of an ilCronJob ist NOT executed.  More...
  | 
|   | 
|   | getId () | 
|   | 
|   | getTitle () | 
|   | 
|   | getDescription () | 
|   | 
|   | hasAutoActivation () | 
|   | Is to be activated on "installation", does only work for ILIAS core cron jobs.  More...
  | 
|   | 
|   | hasFlexibleSchedule () | 
|   | 
|   | getDefaultScheduleType () | 
|   | 
|   | getDefaultScheduleValue () | 
|   | 
|   | run () | 
|   | 
This cron send notifications about expiring user accounts. 
- Author
 - Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om 
 
Definition at line 27 of file class.ilUserCronCheckAccounts.php.
 
◆ checkNotConfirmedUserAccounts()
  
  
      
        
          | ilUserCronCheckAccounts::checkNotConfirmedUserAccounts  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Definition at line 157 of file class.ilUserCronCheckAccounts.php.
References $res, and ilObjectFactory\getInstanceByObjId().
Referenced by run().
  161         $query = 
'SELECT usr_id FROM usr_data '   162                . 
'WHERE (reg_hash IS NOT NULL AND reg_hash != %s)'   164                . 
'AND create_date < %s';
   165         $res = $this->db->queryF(
   167             [
'text', 
'integer', 
'timestamp'],
   168             [
'', 0, date(
'Y-m-d H:i:s', time() - $registration_settings->getRegistrationHashLifetime())]
   170         while ($row = $this->db->fetchAssoc(
$res)) {
   173             $this->log->write(
'Cron: Deleted ' . $user->getLogin() . 
' [' . $user->getId() . 
'] ' . __METHOD__);
 
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id 
 
Class ilObjAuthSettingsGUI. 
 
 
 
 
◆ getDefaultScheduleType()
      
        
          | ilUserCronCheckAccounts::getDefaultScheduleType  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 68 of file class.ilUserCronCheckAccounts.php.
   70         return CronJobScheduleType::SCHEDULE_TYPE_DAILY;
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
 
 
 
◆ getDefaultScheduleValue()
      
        
          | ilUserCronCheckAccounts::getDefaultScheduleValue  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ getDescription()
      
        
          | ilUserCronCheckAccounts::getDescription  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ getId()
      
        
          | ilUserCronCheckAccounts::getId  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ getTitle()
      
        
          | ilUserCronCheckAccounts::getTitle  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ hasAutoActivation()
      
        
          | ilUserCronCheckAccounts::hasAutoActivation  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ hasFlexibleSchedule()
      
        
          | ilUserCronCheckAccounts::hasFlexibleSchedule  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ run()
      
        
          | ilUserCronCheckAccounts::run  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 88 of file class.ilUserCronCheckAccounts.php.
References $res, ilMail\_getAutoGeneratedMessageString(), ilLanguageFactory\_getLanguageOfUser(), ilObjUser\_lookupEmail(), ANONYMOUS_USER_ID, checkNotConfirmedUserAccounts(), ilMail\getSalutation(), ilLanguage\loadLanguageModule(), ilCronJobResult\STATUS_NO_ACTION, ilCronJobResult\STATUS_OK, and ilLanguage\txt().
   93         $two_weeks_in_seconds = $now + (60 * 60 * 24 * 14); 
    96         $query = 
'SELECT usr_id, login, time_limit_until ' .
    98             'WHERE time_limit_message = "0" ' .
    99             'AND time_limit_unlimited = "0" ' .
   100             'AND time_limit_from < ' . $this->db->quote($now, 
'integer') . 
' ' .
   101             'AND time_limit_until > ' . $this->db->quote($now, 
'integer') . 
' ' .
   102             'AND time_limit_until < ' . $this->db->quote($two_weeks_in_seconds, 
'integer');
   104         $res = $this->db->query($query);
   106         while ($row = $this->db->fetchObject(
$res)) {
   107             $expires = $row->time_limit_until;
   108             $login = $row->login;
   109             $usr_id = $row->usr_id;
   116             $body = $salutation . 
"\n\n";
   118                 $lng->
txt(
'account_expires_body'),
   121                 date(
'Y-m-d H:i', $expires)
   132                 $lng->
txt(
'account_expires_subject'),
   138             $query = 
'UPDATE usr_data SET time_limit_message = "1" WHERE usr_id = "' . $usr_id . 
'"';
   139             $this->db->query($query);
   142             $this->log->write(
'Cron: (checkUserAccounts()) sent message to ' . $login . 
'.');
   149         if ($this->counter) {
   153         $result->setStatus($status);
 
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
 
loadLanguageModule(string $a_module)
Load language module. 
 
checkNotConfirmedUserAccounts()
 
static _getLanguageOfUser(int $a_usr_id)
Get language object of user. 
 
final const STATUS_NO_ACTION
 
static getSalutation(int $a_usr_id, ?ilLanguage $a_language=null)
 
static _getAutoGeneratedMessageString(ilLanguage $lang=null)
 
static _lookupEmail(int $a_user_id)
 
 
 
 
◆ $counter
  
  
      
        
          | int ilUserCronCheckAccounts::$counter = 0 | 
         
       
   | 
  
protected   | 
  
 
 
◆ $db
◆ $lng
◆ $log
The documentation for this class was generated from the following file: