Merged in bugfix/PMCORE-773 (pull request #7773)

PMCORE-773 Ldap> OU for retired Employees> The state is not changed to inactive after executing cron.

Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
Roly Rudy Gutierrez Pinto
2021-01-27 19:15:39 +00:00
committed by Julio Cesar Laura Avendaño
2 changed files with 5 additions and 2 deletions

View File

@@ -111,7 +111,6 @@ class ldapadvancedClassCron
//Get all users from Removed OU
$this->usersRemovedOu = $plugin->getUsersFromRemovedOu($arrayAuthenticationSourceData);
$plugin->deactiveArrayOfUsers($this->usersRemovedOu);
//Variables
$this->deletedRemoved = count($this->usersRemovedOu);
@@ -427,6 +426,7 @@ class ldapadvancedClassCron
//Update Users data based on the LDAP Server
$plugin->usersUpdateData($arrayAuthenticationSourceData["AUTH_SOURCE_UID"]);
$plugin->deactiveArrayOfUsers($this->usersRemovedOu);
} catch (Exception $e) {
$plugin = new LdapAdvanced();
$message = $e->getMessage();