summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2013-09-17 19:20:16 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2013-09-17 19:20:16 +0200
commite43e961dcb891541c2574861cbe13484dbf862a8 (patch)
treec6ebb356cba409e5d05c8c41ae40b3665c6b871d /core
parent3f7f6434d1875c2ef68363b7d495faaf9eb00ea8 (diff)
downloadnextcloud-server-e43e961dcb891541c2574861cbe13484dbf862a8.tar.gz
nextcloud-server-e43e961dcb891541c2574861cbe13484dbf862a8.zip
we cannot load avatar on guest page
Diffstat (limited to 'core')
-rw-r--r--core/js/avatar.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/js/avatar.js b/core/js/avatar.js
index 410182f01bf..57e6daa0930 100644
--- a/core/js/avatar.js
+++ b/core/js/avatar.js
@@ -1,7 +1,9 @@
$(document).ready(function(){
- $('#header .avatardiv').avatar(OC.currentUser, 32);
- // Personal settings
- $('#avatar .avatardiv').avatar(OC.currentUser, 128);
+ if (OC.currentUser) {
+ $('#header .avatardiv').avatar(OC.currentUser, 32);
+ // Personal settings
+ $('#avatar .avatardiv').avatar(OC.currentUser, 128);
+ }
// User settings
$.each($('td.avatar .avatardiv'), function(i, element) {
$(element).avatar($(element).parent().parent().data('uid'), 32);