|
| 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, ?JobScheduleType $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 (?JobScheduleType $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 () |
|
| usesLegacyForms () |
|
| getCustomConfigurationInput (\ILIAS\UI\Factory $ui_factory, \ILIAS\Refinery\Factory $factory, \ilLanguage $lng) |
|
| addCustomSettingsToForm (\ilPropertyFormGUI $a_form) |
|
| saveCustomConfiguration (mixed $form_data) |
|
| 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 () |
|
◆ addCustomSettingsToForm()
ilCronDeleteInactivatedUserAccounts::addCustomSettingsToForm |
( |
ilPropertyFormGUI |
$a_form | ) |
|
Definition at line 164 of file class.ilCronDeleteInactivatedUserAccounts.php.
References ilPropertyFormGUI\addItem(), ilNumberInputGUI\allowDecimals(), ANONYMOUS_ROLE_ID, ILIAS\Repository\lng(), null, ILIAS\Repository\objectDataCache(), ilFormPropertyGUI\setInfo(), and ILIAS\Repository\settings().
167 $this->
lng->txt(
'delete_inactivated_user_accounts_include_roles'),
168 'cron_inactivated_user_delete_include_roles' 170 $sub_mlist->
setInfo($this->
lng->txt(
'delete_inactivated_user_accounts_include_roles_desc'));
172 foreach ($this->rbac_review->getGlobalRoles() as $role_id) {
177 $sub_mlist->setOptions($roles);
178 $setting = $this->
settings->get(
'cron_inactivated_user_delete_include_roles',
null);
179 if ($setting ===
null) {
182 $setting = explode(
',', $setting);
184 $sub_mlist->setValue($setting);
185 $sub_mlist->setWidth(300);
189 $this->
lng->txt(
'delete_inactivated_user_accounts_period'),
190 'cron_inactivated_user_delete_period' 193 $sub_text->setInfo($this->
lng->txt(
'delete_inactivated_user_accounts_period_desc'));
196 'cron_inactivated_user_delete_period',
197 (
string) self::DEFAULT_INACTIVITY_PERIOD
200 $sub_text->setSize(4);
201 $sub_text->setMaxLength(4);
202 $sub_text->setRequired(
true);
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
◆ getDefaultScheduleType()
ilCronDeleteInactivatedUserAccounts::getDefaultScheduleType |
( |
| ) |
|
◆ getDefaultScheduleValue()
ilCronDeleteInactivatedUserAccounts::getDefaultScheduleValue |
( |
| ) |
|
◆ getDescription()
ilCronDeleteInactivatedUserAccounts::getDescription |
( |
| ) |
|
◆ getId()
ilCronDeleteInactivatedUserAccounts::getId |
( |
| ) |
|
◆ getTitle()
ilCronDeleteInactivatedUserAccounts::getTitle |
( |
| ) |
|
◆ hasAutoActivation()
ilCronDeleteInactivatedUserAccounts::hasAutoActivation |
( |
| ) |
|
◆ hasCustomSettings()
ilCronDeleteInactivatedUserAccounts::hasCustomSettings |
( |
| ) |
|
◆ hasFlexibleSchedule()
ilCronDeleteInactivatedUserAccounts::hasFlexibleSchedule |
( |
| ) |
|
◆ run()
ilCronDeleteInactivatedUserAccounts::run |
( |
| ) |
|
Definition at line 132 of file class.ilCronDeleteInactivatedUserAccounts.php.
References ilObjUser\_getUserIdsByInactivationPeriod(), ANONYMOUS_USER_ID, ilObjectFactory\getInstanceByObjId(), and SYSTEM_USER_ID.
134 $status = JobResult::STATUS_NO_ACTION;
139 foreach ($usr_ids as $usr_id) {
144 foreach ($this->include_roles as $role_id) {
145 if ($this->rbac_review->isAssigned($usr_id, $role_id)) {
155 $status = JobResult::STATUS_OK;
159 $result->setStatus($status);
const SYSTEM_USER_ID
This file contains constants for PHPStan analyis, see: https://phpstan.org/config-reference#constants...
static _getUserIdsByInactivationPeriod(int $period)
get ids of all users that have been inactivated since at least the given period
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
◆ saveCustomSettings()
Definition at line 206 of file class.ilCronDeleteInactivatedUserAccounts.php.
References ILIAS\FileDelivery\http(), null, ILIAS\Repository\refinery(), and ILIAS\Repository\settings().
208 $roles = implode(
',', $this->
http->wrapper()->post()->retrieve(
209 'cron_inactivated_user_delete_include_roles',
211 $this->refinery->kindlyTo()->listOf($this->
refinery->kindlyTo()->int()),
216 $period = $this->
http->wrapper()->post()->retrieve(
217 'cron_inactivated_user_delete_period',
219 $this->refinery->kindlyTo()->int(),
224 $this->
settings->set(
'cron_inactivated_user_delete_include_roles', $roles);
225 $this->
settings->set(
'cron_inactivated_user_delete_period', (
string) ($period ?? self::DEFAULT_INACTIVITY_PERIOD));
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
static http()
Fetches the global http state from ILIAS.
◆ $http
ILIAS HTTP GlobalHttpState ilCronDeleteInactivatedUserAccounts::$http |
|
private |
◆ $include_roles
array ilCronDeleteInactivatedUserAccounts::$include_roles |
|
private |
◆ $lng
Language ilCronDeleteInactivatedUserAccounts::$lng |
|
private |
◆ $objectDataCache
◆ $period
int ilCronDeleteInactivatedUserAccounts::$period |
|
private |
◆ $rbac_review
ilRbacReview ilCronDeleteInactivatedUserAccounts::$rbac_review |
|
private |
◆ $refinery
ILIAS Refinery Factory ilCronDeleteInactivatedUserAccounts::$refinery |
|
private |
◆ $settings
ilSetting ilCronDeleteInactivatedUserAccounts::$settings |
|
private |
◆ DEFAULT_INACTIVITY_PERIOD
const ilCronDeleteInactivatedUserAccounts::DEFAULT_INACTIVITY_PERIOD = 365 |
|
private |
The documentation for this class was generated from the following file: