diff options
author | patelfenil <patelfenil1996@gmail.com> | 2016-03-07 21:20:29 +0530 |
---|---|---|
committer | patelfenil <patelfenil1996@gmail.com> | 2016-03-07 21:20:29 +0530 |
commit | 5fb96a4630b719d158cf2a0d8868846546012b57 (patch) | |
tree | bf7acb3cdeb7bb0943bff3bd640ade3ab270ccf4 /settings | |
parent | 19dc02b8e0dceda97a83739b62fd8e4b67ac1b78 (diff) | |
download | nextcloud-server-5fb96a4630b719d158cf2a0d8868846546012b57.tar.gz nextcloud-server-5fb96a4630b719d158cf2a0d8868846546012b57.zip |
Remove image now not coming when user changes fullname. Fixes #17320
Diffstat (limited to 'settings')
-rw-r--r-- | settings/js/personal.js | 11 |
1 files changed, 9 insertions, 2 deletions
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 () { |