diff --git a/app/Console/Commands/LdapSync.php b/app/Console/Commands/LdapSync.php index 57baaa83b..94ed764a8 100644 --- a/app/Console/Commands/LdapSync.php +++ b/app/Console/Commands/LdapSync.php @@ -221,12 +221,11 @@ class LdapSync extends Command * * @since 5.0.0 * - * @param int $page The page to get the result set */ - private function processLdapUsers(int $page=0): void + private function processLdapUsers(): void { try { - $ldapUsers = $this->ldap->getLdapUsers($page); + $ldapUsers = $this->ldap->getLdapUsers(); } catch (Exception $e) { $this->outputError($e); exit($e->getMessage()); @@ -242,15 +241,9 @@ class LdapSync extends Command } // Process each individual users - foreach ($ldapUsers as $user) { + foreach ($ldapUsers->getResults() as $user) { // AdLdap2's paginate() method is weird, it gets *everything* and ->getResults() returns *everything* $this->updateCreateUser($user); } - - if ($ldapUsers->getCurrentPage() < $ldapUsers->getPages()-1) { - $current_page = $ldapUsers->getCurrentPage(); - unset($ldapUsers); //deliberately unset the variable so we don't OOM - $this->processLdapUsers($current_page + 1); //this recursive call means that the $ldapUsers variable is not going to get GC'ed until everything returns. Blech. - } } /** diff --git a/config/version.php b/config/version.php index 40e45782a..cecf8f69b 100644 --- a/config/version.php +++ b/config/version.php @@ -1,10 +1,10 @@ 'v5.0.3', - 'full_app_version' => 'v5.0.3 - build 5443-g5f8221470', - 'build_version' => '5443', + 'app_version' => 'v5.0.4', + 'full_app_version' => 'v5.0.4 - build 5452-gc93f4ef0d', + 'build_version' => '5452', 'prerelease_version' => '', - 'hash_version' => 'g5f8221470', - 'full_hash' => 'v5.0.2-27-g5f8221470', + 'hash_version' => 'gc93f4ef0d', + 'full_hash' => 'v5.0.4-7-gc93f4ef0d', 'branch' => 'master', ); \ No newline at end of file