summaryrefslogtreecommitdiffstats
path: root/settings/js
diff options
context:
space:
mode:
authorThomas Müller <DeepDiver1975@users.noreply.github.com>2016-04-25 23:02:00 +0200
committerThomas Müller <DeepDiver1975@users.noreply.github.com>2016-04-25 23:02:00 +0200
commit9ad30f9c92227d441f93d1e42f4fec09170e598e (patch)
treebb243255fdad21b34d04992ce4874852ddc7525c /settings/js
parentf6e1b43a38823b53b3fb80ec78fe6faddb367312 (diff)
parent5fb96a4630b719d158cf2a0d8868846546012b57 (diff)
downloadnextcloud-server-9ad30f9c92227d441f93d1e42f4fec09170e598e.tar.gz
nextcloud-server-9ad30f9c92227d441f93d1e42f4fec09170e598e.zip
Merge pull request #22783 from patelfenil/bugfix-issue-17320
Remove image now not coming when user changes fullname. Fixes #17320
Diffstat (limited to 'settings/js')
-rw-r--r--settings/js/personal.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/settings/js/personal.js b/settings/js/personal.js
index b6e8e2ff508..09f63f3f6af 100644
--- a/settings/js/personal.js
+++ b/settings/js/personal.js
@@ -110,8 +110,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 () {