summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-10-16 09:14:25 +0200
committerGitHub <noreply@github.com>2018-10-16 09:14:25 +0200
commitad66b0f9ab010ee00d249d6f8512d30332e8a0af (patch)
tree335df48bf6b0cf335ee0f79965e8a129a7525055 /lib
parentafaee648dd056d382adc2701dc487fc82fac49ea (diff)
parent2db26d87c444ba385850d63e8d27f3b759102cfe (diff)
downloadnextcloud-server-ad66b0f9ab010ee00d249d6f8512d30332e8a0af.tar.gz
nextcloud-server-ad66b0f9ab010ee00d249d6f8512d30332e8a0af.zip
Merge pull request #11830 from nextcloud/bugfix/9326/make_sure_usermanager_getByEmail_only_returns_IUser
filter null values for UserManager::getByEmail
Diffstat (limited to 'lib')
-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);
+ }));
}
}