summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-03-17 17:34:22 +0100
committerMorris Jobke <hey@morrisjobke.de>2016-03-18 08:59:47 +0100
commit1179462f4edf44e4cf84cc8e2ccbce5288cd8721 (patch)
tree4aaa3553b1e16f45fede8503d117e3b14749f23d /settings
parent7e92ef37e3006f9b1e71ef13284038c22faa1a12 (diff)
downloadnextcloud-server-1179462f4edf44e4cf84cc8e2ccbce5288cd8721.tar.gz
nextcloud-server-1179462f4edf44e4cf84cc8e2ccbce5288cd8721.zip
Update avatar on username change if avatar is set
* fixes #20455
Diffstat (limited to 'settings')
-rw-r--r--settings/js/personal.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/settings/js/personal.js b/settings/js/personal.js
index 3439eba686f..4eeb5c3b39b 100644
--- a/settings/js/personal.js
+++ b/settings/js/personal.js
@@ -75,7 +75,10 @@ function changeDisplayName () {
$('#oldDisplayName').val($('#displayName').val());
// update displayName on the top right expand button
$('#expandDisplayName').text($('#displayName').val());
- updateAvatar();
+ // update avatar if avatar is available
+ if($('#removeavatar').css('display') !== 'none') {
+ updateAvatar();
+ }
}
else {
$('#newdisplayname').val(data.data.displayName);