mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Merge remote-tracking branch 'origin/develop'
# Conflicts: # config/version.php
This commit is contained in:
commit
2844800caf
|
@ -221,12 +221,11 @@ class LdapSync extends Command
|
||||||
*
|
*
|
||||||
* @since 5.0.0
|
* @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 {
|
try {
|
||||||
$ldapUsers = $this->ldap->getLdapUsers($page);
|
$ldapUsers = $this->ldap->getLdapUsers();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$this->outputError($e);
|
$this->outputError($e);
|
||||||
exit($e->getMessage());
|
exit($e->getMessage());
|
||||||
|
@ -242,15 +241,9 @@ class LdapSync extends Command
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process each individual users
|
// 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);
|
$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.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
return array (
|
return array (
|
||||||
'app_version' => 'v5.0.3',
|
'app_version' => 'v5.0.4',
|
||||||
'full_app_version' => 'v5.0.3 - build 5443-g5f8221470',
|
'full_app_version' => 'v5.0.4 - build 5452-gc93f4ef0d',
|
||||||
'build_version' => '5443',
|
'build_version' => '5452',
|
||||||
'prerelease_version' => '',
|
'prerelease_version' => '',
|
||||||
'hash_version' => 'g5f8221470',
|
'hash_version' => 'gc93f4ef0d',
|
||||||
'full_hash' => 'v5.0.2-27-g5f8221470',
|
'full_hash' => 'v5.0.4-7-gc93f4ef0d',
|
||||||
'branch' => 'master',
|
'branch' => 'master',
|
||||||
);
|
);
|
Loading…
Reference in a new issue