From 342a420ebada080f7575003c2e1937757b0df341 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Tue, 17 Sep 2013 19:25:03 +0200 Subject: [PATCH] disable avatar loading on public guest page --- core/js/avatar.js | 8 +++++--- 1 file 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);