]> source.dussan.org Git - nextcloud-server.git/commitdiff
Do not request an avatar if there is none
authorRoeland Jago Douma <rullzer@owncloud.com>
Fri, 4 Dec 2015 13:35:48 +0000 (14:35 +0100)
committerRoeland Jago Douma <rullzer@owncloud.com>
Fri, 4 Dec 2015 13:56:49 +0000 (14:56 +0100)
settings/js/users/users.js

index aeecac7b24308b6be24c5b5d83012e08b360074c..2f8a964bafba060a6f4979618c5dbf1cb34d499b 100644 (file)
@@ -64,8 +64,12 @@ var UserList = {
                /**
                 * Avatar or placeholder
                 */
-               if ($tr.find('div.avatardiv').length){
-                       $('div.avatardiv', $tr).avatar(user.name, 32, undefined, undefined, undefined, user.displayname);
+               if ($tr.find('div.avatardiv').length) {
+                       if (user.isAvatarAvailable === true) {
+                               $('div.avatardiv', $tr).avatar(user.name, 32, undefined, undefined, undefined, user.displayname);
+                       } else {
+                               $('div.avatardiv', $tr).imageplaceholder(user.displayname);
+                       }
                }
 
                /**