Merge pull request #22783 from patelfenil/bugfix-issue-17320

Remove image now not coming when user changes fullname. Fixes #17320
This commit is contained in:
Thomas Müller 2016-04-25 23:02:00 +02:00
commit 9ad30f9c92
1 changed files with 9 additions and 2 deletions

View File

@ -110,8 +110,15 @@ function updateAvatar (hidedefault) {
} }
$displaydiv.css({'background-color': ''}); $displaydiv.css({'background-color': ''});
$displaydiv.avatar(OC.currentUser, 145, true); $displaydiv.avatar(OC.currentUser, 145, true);
$.get(OC.generateUrl(
$('#removeavatar').removeClass('hidden').addClass('inlineblock'); '/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 () { function showAvatarCropper () {