◆ addToExternalSettingsForm()
ilLDAPCronSynchronization::addToExternalSettingsForm |
( |
|
$a_form_id, |
|
|
array & |
$a_fields, |
|
|
|
$a_is_active |
|
) |
| |
◆ deactivateUsers()
ilLDAPCronSynchronization::deactivateUsers |
( |
ilLDAPServer |
$server, |
|
|
|
$a_ldap_users |
|
) |
| |
|
private |
Deactivate users that are disabled in LDAP.
Definition at line 131 of file class.ilLDAPCronSynchronization.php.
References $ilLog, ilObjUser\_getExternalAccountsByAuthMode(), ilObjUser\_toggleActiveStatusOfUsers(), and ilLDAPServer\getAuthenticationMappingKey().
Referenced by run().
135 include_once
'./Services/User/classes/class.ilObjUser.php';
138 if (!array_key_exists($external_account, $a_ldap_users)) {
139 $inactive[] = $usr_id;
142 if (count($inactive)) {
144 $ilLog->write(
'LDAP: Found ' . count($inactive) .
' inactive users.');
148 $ilLog->write(
'LDAP: No inactive users found');
static _getExternalAccountsByAuthMode($a_auth_mode, $a_read_auth_default=false)
Get list of external account by authentication method Note: If login == ext_account for two user with...
static _toggleActiveStatusOfUsers($a_usr_ids, $a_status)
Toggle active status of users.
getAuthenticationMappingKey()
Get authentication mapping key Default is ldap.
◆ getDefaultScheduleType()
ilLDAPCronSynchronization::getDefaultScheduleType |
( |
| ) |
|
◆ getDefaultScheduleValue()
ilLDAPCronSynchronization::getDefaultScheduleValue |
( |
| ) |
|
◆ getDescription()
ilLDAPCronSynchronization::getDescription |
( |
| ) |
|
◆ getId()
ilLDAPCronSynchronization::getId |
( |
| ) |
|
◆ getTitle()
ilLDAPCronSynchronization::getTitle |
( |
| ) |
|
◆ hasAutoActivation()
ilLDAPCronSynchronization::hasAutoActivation |
( |
| ) |
|
◆ hasFlexibleSchedule()
ilLDAPCronSynchronization::hasFlexibleSchedule |
( |
| ) |
|
◆ run()
ilLDAPCronSynchronization::run |
( |
| ) |
|
Definition at line 65 of file class.ilLDAPCronSynchronization.php.
References $ilLog, $messages, $result, $users, ilLDAPServer\_getCronServerIds(), array, ilUserCreationContext\CONTEXT_LDAP, deactivateUsers(), getId(), ilUserCreationContext\getInstance(), IL_LDAP_BIND_DEFAULT, ilCronManager\ping(), ilCronJobResult\STATUS_NO_ACTION, and ilCronJobResult\STATUS_OK.
75 $this->current_server->doConnectionCheck();
76 $ilLog->write(
"LDAP: starting user synchronization for " . $this->current_server->getName());
78 $this->ldap_query =
new ilLDAPQuery($this->current_server);
81 if (is_array(
$users = $this->ldap_query->fetchUsers())) {
87 include_once
'./Services/User/classes/class.ilUserCreationContext.php';
92 while ($user_sliced = array_slice(
$users, $offset, $limit,
true)) {
93 $ilLog->write(
"LDAP: Starting update/creation of users ...");
94 $ilLog->write(
"LDAP: Offset: " . $offset);
96 $this->ldap_to_ilias->setNewUserAuthMode($this->current_server->getAuthenticationMappingKey());
97 $this->ldap_to_ilias->setUserData($user_sliced);
98 $this->ldap_to_ilias->refresh();
99 $ilLog->write(
"LDAP: Finished update/creation");
107 $ilLog->write(
"LDAP: No users for update/create. Aborting.");
110 $mess = $exc->getMessage();
111 $ilLog->write($mess);
117 if ($this->counter) {
static getInstance()
Get instance.
const IL_LDAP_BIND_DEFAULT
deactivateUsers(ilLDAPServer $server, $a_ldap_users)
Deactivate users that are disabled in LDAP.
static _getCronServerIds()
Get list of acticve servers with option 'SyncCron'.
Create styles array
The data for the language used.
static ping($a_job_id)
Keep cron job alive.
Update/create ILIAS user account by given LDAP attributes according to user attribute mapping setting...
Cron job result data container.
◆ $counter
ilLDAPCronSynchronization::$counter = 0 |
|
private |
◆ $current_server
ilLDAPCronSynchronization::$current_server = null |
|
private |
◆ $ldap_query
ilLDAPCronSynchronization::$ldap_query = null |
|
private |
◆ $ldap_to_ilias
ilLDAPCronSynchronization::$ldap_to_ilias = null |
|
private |
The documentation for this class was generated from the following file: