4include_once 
"Services/Cron/classes/class.ilCronJob.php";
 
   30                'cron_inactivated_user_delete_include_roles',
 
   33            if ($this->include_roles === 
null) {
 
   34                $this->include_roles = array();
 
   36                $this->include_roles = explode(
',', $this->include_roles);
 
   40                'cron_inactivated_user_delete_period',
 
   41                self::DEFAULT_INACTIVITY_PERIOD
 
   48        return "user_inactivated";
 
   57        return $lng->txt(
"delete_inactivated_user_accounts");
 
   67            $lng->txt(
"delete_inactivated_user_accounts_desc"),
 
  101        $rbacreview = 
$DIC[
'rbacreview'];
 
  108        foreach ($usr_ids as $usr_id) {
 
  109            if ($usr_id == ANONYMOUS_USER_ID || $usr_id == SYSTEM_USER_ID) {
 
  114            foreach ($this->include_roles as $role_id) {
 
  115                if ($rbacreview->isAssigned($usr_id, $role_id)) {
 
  144        $rbacreview = 
$DIC[
'rbacreview'];
 
  145        $ilObjDataCache = 
$DIC[
'ilObjDataCache'];
 
  148        include_once(
'Services/Form/classes/class.ilMultiSelectInputGUI.php');
 
  150            $lng->txt(
'delete_inactivated_user_accounts_include_roles'),
 
  151            'cron_inactivated_user_delete_include_roles' 
  153        $sub_mlist->setInfo(
$lng->txt(
'delete_inactivated_user_accounts_include_roles_desc'));
 
  155        foreach ($rbacreview->getGlobalRoles() as $role_id) {
 
  156            if ($role_id != ANONYMOUS_ROLE_ID) {
 
  157                $roles[$role_id] = $ilObjDataCache->lookupTitle($role_id);
 
  160        $sub_mlist->setOptions($roles);
 
  161        $setting = 
$ilSetting->get(
'cron_inactivated_user_delete_include_roles', 
null);
 
  162        if ($setting === 
null) {
 
  165            $setting = explode(
',', $setting);
 
  167        $sub_mlist->setValue($setting);
 
  168        $sub_mlist->setWidth(300);
 
  169        #$sub_mlist->setHeight(100); 
  174            $lng->txt(
'delete_inactivated_user_accounts_period'),
 
  175            'cron_inactivated_user_delete_period' 
  177        $sub_text->allowDecimals(
false);
 
  178        $sub_text->setInfo(
$lng->txt(
'delete_inactivated_user_accounts_period_desc'));
 
  179        $sub_text->setValue(
$ilSetting->get(
"cron_inactivated_user_delete_period", $default_setting));
 
  180        $sub_text->setSize(4);
 
  181        $sub_text->setMaxLength(4);
 
  182        $sub_text->setRequired(
true);
 
  201        $setting = implode(
',', 
$_POST[
'cron_inactivated_user_delete_include_roles']);
 
  202        if (!strlen($setting)) {
 
  205        $ilSetting->set(
'cron_inactivated_user_delete_include_roles', $setting);
 
  206        $ilSetting->set(
'cron_inactivated_user_delete_period', 
$_POST[
'cron_inactivated_user_delete_period']);
 
An exception for terminatinating execution or to throw for unit testing.
hasAutoActivation()
Is to be activated on "installation".
hasFlexibleSchedule()
Can the schedule be configured?
getDescription()
Get description.
saveCustomSettings(ilPropertyFormGUI $a_form)
Save custom settings.
getDefaultScheduleValue()
Get schedule value.
getDefaultScheduleType()
Get schedule type.
addCustomSettingsToForm(ilPropertyFormGUI $a_form)
Add custom settings to form.
hasCustomSettings()
Has cron job any custom setting which can be edited?
const DEFAULT_INACTIVITY_PERIOD
Cron job result data container.
Cron job application base class.
const SCHEDULE_TYPE_DAILY
static _getUserIdsByInactivationPeriod($period)
get ids of all users that have been inactivated since at least the given period
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id