Explorar el Código

Do not try to get the avatar if there is no user

tags/v9.0beta1
Roeland Jago Douma hace 8 años
padre
commit
db95c8d512
Se han modificado 1 ficheros con 7 adiciones y 1 borrados
  1. 7
    1
      lib/private/templatelayout.php

+ 7
- 1
lib/private/templatelayout.php Ver fichero

@@ -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');

Cargando…
Cancelar
Guardar