@@ -42,7 +42,6 @@ class ilCronDeleteInactiveUserAccounts extends ilCronJob
4242 private array $ include_roles ;
4343 private ilCronDeleteInactiveUserReminderMail $ cron_delete_reminder_mail ;
4444 private ilSetting $ settings ;
45- private Language $ lng ;
4645 private ilComponentLogger $ log ;
4746 private ilRbacReview $ rbac_review ;
4847 private ilObjectDataCache $ objectDataCache ;
@@ -51,7 +50,19 @@ class ilCronDeleteInactiveUserAccounts extends ilCronJob
5150 private ilCronJobRepository $ cronRepository ;
5251 private \ilGlobalTemplateInterface $ main_tpl ;
5352
54- public function __construct ()
53+ public function __construct (
54+ string $ component ,
55+ \ILIAS \Language \Language $ lng ,
56+ bool $ registration = false
57+ ) {
58+ parent ::__construct ($ component , $ lng );
59+ $ this ->lng ->loadLanguageModule ('usr ' );
60+ if (!$ registration ) {
61+ $ this ->additionalConstruct ();
62+ }
63+ }
64+
65+ private function additionalConstruct ()
5566 {
5667 /** @var ILIAS\DI\Container $DIC */
5768 global $ DIC ;
@@ -67,10 +78,6 @@ public function __construct()
6778 $ this ->http = $ DIC ['http ' ];
6879 }
6980
70- if (isset ($ DIC ['lng ' ])) {
71- $ this ->lng = $ DIC ['lng ' ];
72- }
73-
7481 if (isset ($ DIC ['ilLog ' ])) {
7582 $ this ->log = $ DIC ['ilLog ' ];
7683 }
@@ -259,7 +266,7 @@ private function deleteUserOrSendReminderMail($usr_id): int
259266 if ($ this ->reminder_period > 0 ) {
260267 $ timestamp_for_deletion = $ timestamp_last_login - $ grace_period_over ;
261268 $ account_will_be_deleted_on = $ this ->calculateDeletionData ($ timestamp_for_deletion );
262- if (
269+ if (
263270 $ this ->cron_delete_reminder_mail ->sendReminderMailIfNeeded (
264271 $ user ,
265272 $ this ->reminder_period ,
0 commit comments