4include_once 
"Services/Cron/classes/class.ilCronJob.php";
 
   28                'cron_inactivated_user_delete_include_roles',
 
   31            if ($this->include_roles === 
null) {
 
   32                $this->include_roles = array();
 
   34                $this->include_roles = explode(
',', $this->include_roles);
 
   38                'cron_inactivated_user_delete_period',
 
   39                self::DEFAULT_INACTIVITY_PERIOD
 
   46        return "user_inactivated";
 
   53        return $lng->txt(
"delete_inactivated_user_accounts");
 
   61            $lng->txt(
"delete_inactivated_user_accounts_desc"),
 
  100        foreach ($usr_ids as $usr_id) {
 
  101            if ($usr_id == ANONYMOUS_USER_ID || $usr_id == SYSTEM_USER_ID) {
 
  106            foreach ($this->include_roles as $role_id) {
 
  107                if ($rbacreview->isAssigned($usr_id, $role_id)) {
 
  135        include_once(
'Services/Form/classes/class.ilMultiSelectInputGUI.php');
 
  137            $lng->txt(
'delete_inactivated_user_accounts_include_roles'),
 
  138            'cron_inactivated_user_delete_include_roles' 
  140        $sub_mlist->setInfo(
$lng->txt(
'delete_inactivated_user_accounts_include_roles_desc'));
 
  142        foreach ($rbacreview->getGlobalRoles() as $role_id) {
 
  143            if ($role_id != ANONYMOUS_ROLE_ID) {
 
  144                $roles[$role_id] = $ilObjDataCache->lookupTitle($role_id);
 
  147        $sub_mlist->setOptions($roles);
 
  148        $setting = 
$ilSetting->get(
'cron_inactivated_user_delete_include_roles', 
null);
 
  149        if ($setting === 
null) {
 
  152            $setting = explode(
',', $setting);
 
  154        $sub_mlist->setValue($setting);
 
  155        $sub_mlist->setWidth(300);
 
  156        #$sub_mlist->setHeight(100); 
  161            $lng->txt(
'delete_inactivated_user_accounts_period'),
 
  162            'cron_inactivated_user_delete_period' 
  164        $sub_text->allowDecimals(
false);
 
  165        $sub_text->setInfo(
$lng->txt(
'delete_inactivated_user_accounts_period_desc'));
 
  166        $sub_text->setValue(
$ilSetting->get(
"cron_inactivated_user_delete_period", $default_setting));
 
  167        $sub_text->setSize(4);
 
  168        $sub_text->setMaxLength(4);
 
  169        $sub_text->setRequired(
true);
 
  186        $setting = implode(
',', 
$_POST[
'cron_inactivated_user_delete_include_roles']);
 
  187        if (!strlen($setting)) {
 
  190        $ilSetting->set(
'cron_inactivated_user_delete_include_roles', $setting);
 
  191        $ilSetting->set(
'cron_inactivated_user_delete_period', 
$_POST[
'cron_inactivated_user_delete_period']);
 
sprintf('%.4f', $callTime)
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