summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/User/User.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/User/User.php b/lib/private/User/User.php
index 48c913db2a9..0d12eb494ec 100644
--- a/lib/private/User/User.php
+++ b/lib/private/User/User.php
@@ -138,11 +138,12 @@ class User implements IUser {
*/
public function setDisplayName($displayName) {
$displayName = trim($displayName);
+ $oldDisplayName = $this->getDisplayName();
if ($this->backend->implementsActions(Backend::SET_DISPLAYNAME) && !empty($displayName)) {
$result = $this->backend->setDisplayName($this->uid, $displayName);
if ($result) {
$this->displayName = $displayName;
- $this->triggerChange('displayName', $displayName);
+ $this->triggerChange('displayName', $displayName, $oldDisplayName);
}
return $result !== false;
}