summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-05-02 14:19:10 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2016-05-02 14:20:59 +0200
commitb10dcfc3b7e84c97d4dba4f7c63b4dff2fbc310b (patch)
tree05929798758ba15073d40fbfd445f46ea8498987 /lib/private
parentd7eb17bdc023c6e31d24a0636e0f5cad58aa876f (diff)
downloadnextcloud-server-b10dcfc3b7e84c97d4dba4f7c63b4dff2fbc310b.tar.gz
nextcloud-server-b10dcfc3b7e84c97d4dba4f7c63b4dff2fbc310b.zip
Fixing local event delivery for calendar events based on the email address
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/user/manager.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/private/user/manager.php b/lib/private/user/manager.php
index 4371be134aa..37a3e5ba134 100644
--- a/lib/private/user/manager.php
+++ b/lib/private/user/manager.php
@@ -33,6 +33,7 @@
namespace OC\User;
use OC\Hooks\PublicEmitter;
+use OCP\IUser;
use OCP\IUserBackend;
use OCP\IUserManager;
use OCP\IConfig;
@@ -354,4 +355,17 @@ class Manager extends PublicEmitter implements IUserManager {
} while (count($users) >= $limit);
}
}
+
+ /**
+ * @param string $email
+ * @return IUser[]
+ * @since 9.1.0
+ */
+ public function getByEmail($email) {
+ $userIds = $this->config->getUsersForUserValue('settings', 'email', $email);
+
+ return array_map(function($uid) {
+ return $this->get($uid);
+ }, $userIds);
+ }
}