File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,6 +33,12 @@ public function init(
3333 array | \ArrayAccess &$ internal ,
3434 ): void {
3535 $ contribute [\ILIAS \Setup \Agent::class] = static fn () =>
36- new \ILIAS \LDAP \Setup \Agent ();
36+ new \ILIAS \LDAP \Setup \Agent ();
37+ $ contribute [\ILIAS \Cron \CronJob::class] = static fn () =>
38+ new \ilLDAPCronSynchronization (
39+ 'components \\' . self ::class,
40+ $ use [\ILIAS \Language \Language::class],
41+ true
42+ );
3743 }
3844}
Original file line number Diff line number Diff line change 2626*/
2727class ilLDAPCronSynchronization extends ilCronJob
2828{
29- private ilLanguage $ lng ;
3029 private ilLogger $ logger ;
3130 private ilCronManager $ cronManager ;
3231
3332 private int $ counter = 0 ;
3433
35- public function __construct ()
34+ public function __construct (
35+ string $ component ,
36+ \ILIAS \Language \Language $ lng ,
37+ bool $ registration = false
38+ ) {
39+ parent ::__construct ($ component , $ lng );
40+ $ this ->lng ->loadLanguageModule ('ldap ' );
41+ if (!$ registration ) {
42+ $ this ->additionalConstruct ();
43+ }
44+ }
45+
46+ private function additionalConstruct ()
3647 {
3748 global $ DIC ;
38-
3949 $ this ->logger = $ DIC ->logger ()->auth ();
4050 $ this ->cronManager = $ DIC ->cron ()->manager ();
41- $ this ->lng = $ DIC ->language ();
42- $ this ->lng ->loadLanguageModule ('ldap ' );
4351 }
4452
4553 public function getId (): string
Original file line number Diff line number Diff line change 66 <pluginslots >
77 <pluginslot id =" ldaphk" name =" LDAPHook" />
88 </pluginslots >
9- <crons >
10- <cron id =" ldap_sync" class =" ilLDAPCronSynchronization" />
11- </crons >
129</service >
You can’t perform that action at this time.
0 commit comments