aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/User
diff options
context:
space:
mode:
authorGeorg Ehrke <developer@georgehrke.com>2018-10-14 19:09:55 +0200
committerGeorg Ehrke <developer@georgehrke.com>2018-10-15 13:27:58 +0200
commit2db26d87c444ba385850d63e8d27f3b759102cfe (patch)
tree20eeff3bfbeec2b83558f09f61f53d90611a7788 /lib/private/User
parent0fca815b4dd601381a909656a1e3e7a7e89714d2 (diff)
downloadnextcloud-server-2db26d87c444ba385850d63e8d27f3b759102cfe.tar.gz
nextcloud-server-2db26d87c444ba385850d63e8d27f3b759102cfe.zip
filter null values for UserManager::getByEmail
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
Diffstat (limited to 'lib/private/User')
-rw-r--r--lib/private/User/Manager.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/User/Manager.php b/lib/private/User/Manager.php
index 494a345be59..16a911b90ac 100644
--- a/lib/private/User/Manager.php
+++ b/lib/private/User/Manager.php
@@ -591,8 +591,12 @@ class Manager extends PublicEmitter implements IUserManager {
public function getByEmail($email) {
$userIds = $this->config->getUsersForUserValue('settings', 'email', $email);
- return array_map(function($uid) {
+ $users = array_map(function($uid) {
return $this->get($uid);
}, $userIds);
+
+ return array_values(array_filter($users, function($u) {
+ return ($u instanceof IUser);
+ }));
}
}