4 include_once
"Services/Cron/classes/class.ilCronJob.php";
26 if(is_object($ilSetting))
28 $this->include_roles = $ilSetting->get(
29 'cron_inactivated_user_delete_include_roles', null
31 if($this->include_roles === null) $this->include_roles = array();
32 else $this->include_roles = explode(
',', $this->include_roles);
34 $this->period = $ilSetting->get(
35 'cron_inactivated_user_delete_period',
36 self::DEFAULT_INACTIVITY_PERIOD
43 return "user_inactivated";
50 return $lng->txt(
"delete_inactivated_user_accounts");
57 return $lng->txt(
"delete_inactivated_user_accounts_desc");
96 if($usr_id == ANONYMOUS_USER_ID || $usr_id == SYSTEM_USER_ID)
continue;
99 foreach($this->include_roles as $role_id)
101 if( $rbacreview->isAssigned($usr_id, $role_id) )
107 if($continue)
continue;
129 include_once(
'Services/Form/classes/class.ilMultiSelectInputGUI.php');
131 $lng->txt(
'delete_inactivated_user_accounts_include_roles'),
132 'cron_inactivated_user_delete_include_roles'
134 $sub_mlist->
setInfo($lng->txt(
'delete_inactivated_user_accounts_include_roles_desc'));
136 foreach($rbacreview->getGlobalRoles() as $role_id)
138 if( $role_id != ANONYMOUS_ROLE_ID )
139 $roles[$role_id] = $ilObjDataCache->lookupTitle($role_id);
141 $sub_mlist->setOptions($roles);
142 $setting = $ilSetting->get(
'cron_inactivated_user_delete_include_roles', null);
143 if($setting === null) $setting = array();
144 else $setting = explode(
',', $setting);
145 $sub_mlist->setValue($setting);
146 $sub_mlist->setWidth(300);
147 #$sub_mlist->setHeight(100);
152 $lng->txt(
'delete_inactivated_user_accounts_period'),
153 'cron_inactivated_user_delete_period'
155 $sub_text->
setInfo($lng->txt(
'delete_inactivated_user_accounts_period_desc'));
156 $sub_text->setValue($ilSetting->get(
"cron_inactivated_user_delete_period", $default_setting));
157 $sub_text->setSize(4);
158 $sub_text->setMaxLength(4);
159 $sub_text->setRequired(
true);
176 $setting = implode(
',',
$_POST[
'cron_inactivated_user_delete_include_roles']);
177 if( !strlen($setting) ) $setting = null;
178 $ilSetting->set(
'cron_inactivated_user_delete_include_roles', $setting);
179 $ilSetting->set(
'cron_inactivated_user_delete_period',
$_POST[
'cron_inactivated_user_delete_period']);