/** * Hook * * @param Array $params * * @return void */ function codendi_daily_start($params) { if ($GLOBALS['sys_auth_type'] == 'ldap' && $this->isDailySyncEnabled()) { $ldapQuery = new LDAP_DirectorySynchronization($this->getLdap(), $this->getLogger()); $ldapQuery->syncAll(); $retentionPeriod = $this->getLdap()->getLDAPParam('daily_sync_retention_period'); if ($retentionPeriod != NULL && $retentionPeriod != "") { $ldapCleanUpManager = new LDAP_CleanUpManager($retentionPeriod); $ldapCleanUpManager->cleanAll(); } //Synchronize the ugroups with the ldap ones $ldapUserGroupManager = new LDAP_UserGroupManager($this->getLdap()); $ldapUserGroupManager->synchronizeUgroups(); return true; } }
/** * Hook * * @param Array $params * * @return void */ function codendi_daily_start($params) { if ($GLOBALS['sys_auth_type'] == 'ldap' && $this->isDailySyncEnabled()) { $ldapQuery = new LDAP_DirectorySynchronization($this->getLdap()); $ldapQuery->syncAll(); //Synchronize the ugroups with the ldap ones $ldapUserGroupManager = new LDAP_UserGroupManager($this->getLdap()); $ldapUserGroupManager->synchronizeUgroups(); return true; } }