diff options
author | Roeland Jago Douma <rullzer@owncloud.com> | 2015-12-16 20:51:56 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-12-17 09:14:04 +0100 |
commit | db95c8d51268db6ca17567743591c6e87b7a39d8 (patch) | |
tree | 1c4c942037314ad6af26e0931d0b912cc012c2cf /lib/private/templatelayout.php | |
parent | 1d932e4c98d7a08d9e34e85112b77dc76ca65482 (diff) | |
download | nextcloud-server-db95c8d51268db6ca17567743591c6e87b7a39d8.tar.gz nextcloud-server-db95c8d51268db6ca17567743591c6e87b7a39d8.zip |
Do not try to get the avatar if there is no user
Diffstat (limited to 'lib/private/templatelayout.php')
-rw-r--r-- | lib/private/templatelayout.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/templatelayout.php b/lib/private/templatelayout.php index 1a6a07ddc9f..8522dbccc00 100644 --- a/lib/private/templatelayout.php +++ b/lib/private/templatelayout.php @@ -136,7 +136,13 @@ class OC_TemplateLayout extends OC_Template { $this->assign('user_uid', OC_User::getUser()); $this->assign('appsmanagement_active', $appsMgmtActive); $this->assign('enableAvatars', $this->config->getSystemValue('enable_avatars', true)); - $this->assign('userAvatarSet', \OC_Helper::userAvatarSet(OC_User::getUser())); + + if (OC_User::getUser() === false) { + $this->assign('userAvatarSet', false); + } else { + $this->assign('userAvatarSet', \OC::$server->getAvatarManager()->getAvatar(OC_User::getUser())->exists()); + } + } else if ($renderAs == 'error') { parent::__construct('core', 'layout.guest', '', false); $this->assign('bodyid', 'body-login'); |