| 
|   | __construct () | 
|   | 
|   | getId () | 
|   | 
|   | getTitle () | 
|   | 
|   | getDescription () | 
|   | 
|   | getDefaultScheduleType () | 
|   | 
|   | getDefaultScheduleValue () | 
|   | 
|   | hasAutoActivation () | 
|   | 
|   | hasFlexibleSchedule () | 
|   | 
|   | hasCustomSettings () | 
|   | 
|   | run () | 
|   | 
|   | addCustomSettingsToForm (ilPropertyFormGUI $a_form) | 
|   | 
|   | saveCustomSettings (ilPropertyFormGUI $a_form) | 
|   | 
|   | 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 () | 
|   | 
◆ __construct()
      
        
          | ilCronDeleteNeverLoggedInUserAccounts::__construct  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ addCustomSettingsToForm()
      
        
          | ilCronDeleteNeverLoggedInUserAccounts::addCustomSettingsToForm  | 
          ( | 
          ilPropertyFormGUI  | 
          $a_form | ) | 
           | 
        
      
 
Definition at line 187 of file class.ilCronDeleteNeverLoggedInUserAccounts.php.
References ilPropertyFormGUI\addItem(), ANONYMOUS_ROLE_ID, ILIAS\Repository\lng(), ILIAS\Repository\objectDataCache(), and ilFormPropertyGUI\setInfo().
  190             $this->
lng->txt(
'cron_users_without_login_del_role_whitelist'),
   193         $roleWhiteList->
setInfo($this->
lng->txt(
'cron_users_without_login_del_role_whitelist_info'));
   195         foreach ($this->rbacreview->getGlobalRoles() as $role_id) {
   200         $roleWhiteList->setOptions($roles);
   201         $roleWhiteList->setValue(array_filter(array_map(
'intval', explode(
',', $this->roleIdWhiteliste))));
   202         $roleWhiteList->setWidth(300);
   203         $a_form->
addItem($roleWhiteList);
   206             $this->
lng->txt(
'cron_users_without_login_del_create_date_thr'),
   209         $threshold->allowDecimals(
false);
   210         $threshold->setInfo($this->
lng->txt(
'cron_users_without_login_del_create_date_thr_info'));
   211         $threshold->setValue((
string) $this->thresholdInDays);
   212         $threshold->setSuffix($this->
lng->txt(
'days'));
   213         $threshold->setSize(4);
   214         $threshold->setMaxLength(4);
   215         $threshold->setRequired(
true);
 
 
 
 
◆ getDefaultScheduleType()
      
        
          | ilCronDeleteNeverLoggedInUserAccounts::getDefaultScheduleType  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ getDefaultScheduleValue()
      
        
          | ilCronDeleteNeverLoggedInUserAccounts::getDefaultScheduleValue  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ getDescription()
      
        
          | ilCronDeleteNeverLoggedInUserAccounts::getDescription  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ getId()
      
        
          | ilCronDeleteNeverLoggedInUserAccounts::getId  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ getTitle()
      
        
          | ilCronDeleteNeverLoggedInUserAccounts::getTitle  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ hasAutoActivation()
      
        
          | ilCronDeleteNeverLoggedInUserAccounts::hasAutoActivation  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ hasCustomSettings()
      
        
          | ilCronDeleteNeverLoggedInUserAccounts::hasCustomSettings  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ hasFlexibleSchedule()
      
        
          | ilCronDeleteNeverLoggedInUserAccounts::hasFlexibleSchedule  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ run()
      
        
          | ilCronDeleteNeverLoggedInUserAccounts::run  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 125 of file class.ilCronDeleteNeverLoggedInUserAccounts.php.
References $DIC, $message, ANONYMOUS_USER_ID, ilObjectFactory\getInstanceByObjId(), ilObjUser\getUserIdsNeverLoggedIn(), ilCronJobResult\STATUS_NO_ACTION, ilCronJobResult\STATUS_OK, and SYSTEM_USER_ID.
  135             $this->thresholdInDays ?: self::DEFAULT_CREATION_THRESHOLD
   138         $roleIdWhitelist = array_filter(array_map(
'intval', explode(
',', $this->roleIdWhiteliste)));
   141         foreach ($userIds as $userId) {
   153             if (count($roleIdWhitelist) > 0) {
   154                 $assignedRoleIds = array_filter(array_map(
'intval', $this->rbacreview->assignedRoles($userId)));
   156                 $respectedRolesToInclude = array_intersect($assignedRoleIds, $roleIdWhitelist);
   157                 if (count($respectedRolesToInclude) > 0) {
   166             $DIC->logger()->user()->info(sprintf(
   167                 "Deleting user account with id %s (login: %s)",
   178             $message = sprintf(
'%s user(s) deleted', $counter);
   181         $result->setStatus($status);
 
const SYSTEM_USER_ID
This file contains constants for PHPStan analyis, see: https://phpstan.org/config-reference#constants...
 
final const STATUS_NO_ACTION
 
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id 
 
static getUserIdsNeverLoggedIn(int $thresholdInDays)
Get ids of all users that have never logged in. 
 
 
 
 
◆ saveCustomSettings()
      
        
          | ilCronDeleteNeverLoggedInUserAccounts::saveCustomSettings  | 
          ( | 
          ilPropertyFormGUI  | 
          $a_form | ) | 
           | 
        
      
 
Definition at line 219 of file class.ilCronDeleteNeverLoggedInUserAccounts.php.
References Vendor\Package\$e, $valid, ilPropertyFormGUI\getItemByPostVar(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and ILIAS\Repository\settings().
  223         $this->roleIdWhiteliste = implode(
',', $this->
http->wrapper()->post()->retrieve(
   226                 $this->refinery->kindlyTo()->listOf($this->
refinery->kindlyTo()->int()),
   232             $this->thresholdInDays = $this->
http->wrapper()->post()->retrieve(
   238             $a_form->
getItemByPostVar(
'threshold')->setAlert($this->
lng->txt(
'user_never_logged_in_info_threshold_err_num'));
   243                 'cron_users_without_login_delete_incl_roles',
   244                 $this->roleIdWhiteliste
   247                 'cron_users_without_login_delete_threshold',
   248                 (
string) $this->thresholdInDays
   253         $this->main_tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'form_input_not_valid'));
 
static http()
Fetches the global http state from ILIAS. 
 
 
 
 
◆ $http
  
  
      
        
          | ILIAS HTTP GlobalHttpState ilCronDeleteNeverLoggedInUserAccounts::$http | 
         
       
   | 
  
private   | 
  
 
 
◆ $lng
  
  
      
        
          | ilLanguage ilCronDeleteNeverLoggedInUserAccounts::$lng | 
         
       
   | 
  
private   | 
  
 
 
◆ $main_tpl
◆ $objectDataCache
◆ $rbacreview
  
  
      
        
          | ilRbacReview ilCronDeleteNeverLoggedInUserAccounts::$rbacreview | 
         
       
   | 
  
private   | 
  
 
 
◆ $refinery
  
  
      
        
          | ILIAS Refinery Factory ilCronDeleteNeverLoggedInUserAccounts::$refinery | 
         
       
   | 
  
private   | 
  
 
 
◆ $roleIdWhiteliste
  
  
      
        
          | string ilCronDeleteNeverLoggedInUserAccounts::$roleIdWhiteliste = '' | 
         
       
   | 
  
private   | 
  
 
 
◆ $settings
  
  
      
        
          | ilSetting ilCronDeleteNeverLoggedInUserAccounts::$settings | 
         
       
   | 
  
private   | 
  
 
 
◆ $thresholdInDays
  
  
      
        
          | int ilCronDeleteNeverLoggedInUserAccounts::$thresholdInDays = self::DEFAULT_CREATION_THRESHOLD | 
         
       
   | 
  
private   | 
  
 
 
◆ DEFAULT_CREATION_THRESHOLD
  
  
      
        
          | const ilCronDeleteNeverLoggedInUserAccounts::DEFAULT_CREATION_THRESHOLD = 365 | 
         
       
   | 
  
private   | 
  
 
 
The documentation for this class was generated from the following file: