summaryrefslogtreecommitdiffstats
path: root/lib/private/avatarmanager.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-01-22 11:34:49 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2016-01-25 20:05:11 +0100
commitf165ad8864e5bdb213bdeb06d96b66612cee4fef (patch)
treea2ca41f40852b39fa16c79ca074cd6a1ac617712 /lib/private/avatarmanager.php
parentfe08700b597b8c765716e92569d30524cfef9b84 (diff)
downloadnextcloud-server-f165ad8864e5bdb213bdeb06d96b66612cee4fef.tar.gz
nextcloud-server-f165ad8864e5bdb213bdeb06d96b66612cee4fef.zip
Changing the avatar of the user emits the changeUser event which triggers update of the system addressbook
Diffstat (limited to 'lib/private/avatarmanager.php')
-rw-r--r--lib/private/avatarmanager.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/private/avatarmanager.php b/lib/private/avatarmanager.php
index b14f8133e63..b39f5495122 100644
--- a/lib/private/avatarmanager.php
+++ b/lib/private/avatarmanager.php
@@ -61,10 +61,11 @@ class AvatarManager implements IAvatarManager {
* @return \OCP\IAvatar
* @throws \Exception In case the username is potentially dangerous
*/
- public function getAvatar($user) {
- if (!$this->userManager->userExists($user)) {
+ public function getAvatar($userId) {
+ $user = $this->userManager->get($userId);
+ if (is_null($user)) {
throw new \Exception('user does not exist');
}
- return new Avatar($this->rootFolder->getUserFolder($user)->getParent(), $this->l);
+ return new Avatar($this->rootFolder->getUserFolder($userId)->getParent(), $this->l, $user);
}
}