From 5fb96a4630b719d158cf2a0d8868846546012b57 Mon Sep 17 00:00:00 2001 From: patelfenil Date: Mon, 7 Mar 2016 21:20:29 +0530 Subject: Remove image now not coming when user changes fullname. Fixes #17320 --- settings/js/personal.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'settings/js') diff --git a/settings/js/personal.js b/settings/js/personal.js index b0bfa8eb230..2a5c60aa705 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -107,8 +107,15 @@ function updateAvatar (hidedefault) { } $displaydiv.css({'background-color': ''}); $displaydiv.avatar(OC.currentUser, 145, true); - - $('#removeavatar').removeClass('hidden').addClass('inlineblock'); + $.get(OC.generateUrl( + '/avatar/{user}/{size}', + {user: OC.currentUser, size: 1} + ), function (result) { + if (typeof(result) === 'string') { + // Show the delete button when the avatar is custom + $('#removeavatar').removeClass('hidden').addClass('inlineblock'); + } + }); } function showAvatarCropper () { -- cgit v1.2.3