aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 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 () {