]> source.dussan.org Git - nextcloud-server.git/commitdiff
lib/private/User,apps/user_ldap/lib/User: always pass old value to User::triggerChange
authorLeon Klingele <leon@struktur.de>
Wed, 6 Mar 2019 12:07:41 +0000 (13:07 +0100)
committerMorris Jobke <hey@morrisjobke.de>
Thu, 11 Apr 2019 09:20:41 +0000 (11:20 +0200)
lib/private/User/User.php

index 48c913db2a93b07f86d81936ed0c6b30182c3fd7..0d12eb494ecfb5f064bcd8455101fe4e0b07fbb6 100644 (file)
@@ -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;
                }