Don't loop over the backends, we already know where the user should be

This commit is contained in:
Joas Schilling 2016-04-28 12:03:19 +02:00
parent ba0099f73a
commit 76af70180d
No known key found for this signature in database
GPG Key ID: 70A0B324C41C0946
1 changed files with 3 additions and 3 deletions

View File

@ -335,11 +335,11 @@ class Manager extends PublicEmitter implements IUserManager {
$offset = 0;
do {
$users = $backend->getUsers($search, $limit, $offset);
foreach ($users as $user) {
$user = $this->get($user);
if (is_null($user)) {
foreach ($users as $uid) {
if (!$backend->userExists($uid)) {
continue;
}
$user = $this->getUserObject($uid, $backend);
$return = $callback($user);
if ($return === false) {
break;