diff options
Diffstat (limited to 'lib/private/user')
-rw-r--r-- | lib/private/user/user.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/user/user.php b/lib/private/user/user.php index d8a888806e0..5b8bb6947a5 100644 --- a/lib/private/user/user.php +++ b/lib/private/user/user.php @@ -137,8 +137,13 @@ class User implements IUser { public function setDisplayName($displayName) { $displayName = trim($displayName); if ($this->backend->implementsActions(\OC_User_Backend::SET_DISPLAYNAME) && !empty($displayName)) { - $this->displayName = $displayName; $result = $this->backend->setDisplayName($this->uid, $displayName); + if ($result) { + $this->displayName = $displayName; + if ($this->emitter) { + $this->emitter->emit('\OC\User', 'changeUser', array($this)); + } + } return $result !== false; } else { return false; |