ILIAS  trunk Revision v12.0_alpha-1329-g1094ddb0c33
ILIAS\Registration\DualOptIn\Cron\DeleteExpiredPendingRegistrationsCronJob Class Reference

Cronjob to delete user accounts for which the registration (dual opt-in) has never been finalized. More...

+ Inheritance diagram for ILIAS\Registration\DualOptIn\Cron\DeleteExpiredPendingRegistrationsCronJob:
+ Collaboration diagram for ILIAS\Registration\DualOptIn\Cron\DeleteExpiredPendingRegistrationsCronJob:

Public Member Functions

 init ()
 
 getId ()
 
 getTitle ()
 
 getDescription ()
 
 getDefaultScheduleType ()
 
 getDefaultScheduleValue ()
 
 hasAutoActivation ()
 Is to be activated on "installation", does only work for ILIAS core cron jobs. More...
 
 hasFlexibleSchedule ()
 
 run ()
 
- Public Member Functions inherited from ILIAS\Cron\CronJob
 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 ()
 

Private Attributes

ilLanguage $lng
 
DualOptInService $dual_opt_in_service
 

Additional Inherited Members

- Protected Attributes inherited from ILIAS\Cron\CronJob
JobScheduleType $schedule_type = null
 
int $schedule_value = null
 
Closure $date_time_provider = null
 

Detailed Description

Cronjob to delete user accounts for which the registration (dual opt-in) has never been finalized.

Definition at line 32 of file DeleteExpiredPendingRegistrationsCronJob.php.

Member Function Documentation

◆ getDefaultScheduleType()

ILIAS\Registration\DualOptIn\Cron\DeleteExpiredPendingRegistrationsCronJob::getDefaultScheduleType ( )

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 70 of file DeleteExpiredPendingRegistrationsCronJob.php.

71 {
72 return JobScheduleType::DAILY;
73 }

◆ getDefaultScheduleValue()

ILIAS\Registration\DualOptIn\Cron\DeleteExpiredPendingRegistrationsCronJob::getDefaultScheduleValue ( )

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 75 of file DeleteExpiredPendingRegistrationsCronJob.php.

75 : ?int
76 {
77 return null;
78 }

◆ getDescription()

ILIAS\Registration\DualOptIn\Cron\DeleteExpiredPendingRegistrationsCronJob::getDescription ( )

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 63 of file DeleteExpiredPendingRegistrationsCronJob.php.

63 : string
64 {
65 $this->init();
66
67 return $this->lng->txt('reg_delete_expired_pending_registrations_desc');
68 }

References ILIAS\Registration\DualOptIn\Cron\DeleteExpiredPendingRegistrationsCronJob\init(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ getId()

ILIAS\Registration\DualOptIn\Cron\DeleteExpiredPendingRegistrationsCronJob::getId ( )

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 51 of file DeleteExpiredPendingRegistrationsCronJob.php.

51 : string
52 {
53 return 'reg_delete_expired_pending_registrations';
54 }

◆ getTitle()

ILIAS\Registration\DualOptIn\Cron\DeleteExpiredPendingRegistrationsCronJob::getTitle ( )

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 56 of file DeleteExpiredPendingRegistrationsCronJob.php.

56 : string
57 {
58 $this->init();
59
60 return $this->lng->txt('reg_delete_expired_pending_registrations');
61 }

References ILIAS\Registration\DualOptIn\Cron\DeleteExpiredPendingRegistrationsCronJob\init(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ hasAutoActivation()

ILIAS\Registration\DualOptIn\Cron\DeleteExpiredPendingRegistrationsCronJob::hasAutoActivation ( )

Is to be activated on "installation", does only work for ILIAS core cron jobs.

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 80 of file DeleteExpiredPendingRegistrationsCronJob.php.

80 : bool
81 {
82 return false;
83 }

◆ hasFlexibleSchedule()

ILIAS\Registration\DualOptIn\Cron\DeleteExpiredPendingRegistrationsCronJob::hasFlexibleSchedule ( )

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 85 of file DeleteExpiredPendingRegistrationsCronJob.php.

85 : bool
86 {
87 return false;
88 }

◆ init()

ILIAS\Registration\DualOptIn\Cron\DeleteExpiredPendingRegistrationsCronJob::init ( )

Definition at line 37 of file DeleteExpiredPendingRegistrationsCronJob.php.

37 : void
38 {
39 global $DIC;
40
41 $this->lng = $DIC->language();
42 $this->dual_opt_in_service = new \ILIAS\Registration\DualOptIn\Service\DualOptInServiceImpl(
44 new \ILIAS\Registration\DualOptIn\Repository\PendingRegistrationDatabaseRepository($DIC->database()),
45 $DIC->database(),
46 $DIC->logger()->user(),
47 (new \ILIAS\Data\Factory())->clock()
48 );
49 }
Class ilObjAuthSettingsGUI.
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
global $DIC
Definition: shib_login.php:26

References $DIC, and ILIAS\Repository\lng().

Referenced by ILIAS\Registration\DualOptIn\Cron\DeleteExpiredPendingRegistrationsCronJob\getDescription(), ILIAS\Registration\DualOptIn\Cron\DeleteExpiredPendingRegistrationsCronJob\getTitle(), and ILIAS\Registration\DualOptIn\Cron\DeleteExpiredPendingRegistrationsCronJob\run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ run()

ILIAS\Registration\DualOptIn\Cron\DeleteExpiredPendingRegistrationsCronJob::run ( )

Reimplemented from ILIAS\Cron\CronJob.

Definition at line 90 of file DeleteExpiredPendingRegistrationsCronJob.php.

90 : JobResult
91 {
92 $this->init();
93
94 $num_deleted_users = $this->dual_opt_in_service->deleteExpiredUserObjects();
95
96 $result = new JobResult();
97 $result->setStatus(JobResult::STATUS_OK);
98 $result->setMessage(sprintf('%d inactive user objects with expired confirmation hash values (dual opt-in) deleted.', $num_deleted_users));
99
100 return $result;
101 }
final const int STATUS_OK
Definition: JobResult.php:27

References ILIAS\Registration\DualOptIn\Cron\DeleteExpiredPendingRegistrationsCronJob\init(), and ILIAS\Cron\Job\JobResult\STATUS_OK.

+ Here is the call graph for this function:

Field Documentation

◆ $dual_opt_in_service

DualOptInService ILIAS\Registration\DualOptIn\Cron\DeleteExpiredPendingRegistrationsCronJob::$dual_opt_in_service
private

Definition at line 35 of file DeleteExpiredPendingRegistrationsCronJob.php.

◆ $lng

ilLanguage ILIAS\Registration\DualOptIn\Cron\DeleteExpiredPendingRegistrationsCronJob::$lng
private

Definition at line 34 of file DeleteExpiredPendingRegistrationsCronJob.php.


The documentation for this class was generated from the following file: