Skip to content
Snippets Groups Projects
Unverified Commit 3eb0d4f1 authored by Leon Klingele's avatar Leon Klingele Committed by Morris Jobke
Browse files

lib/private/User,apps/user_ldap/lib/User: always pass old value to User::triggerChange

parent ccabc63a
No related branches found
No related tags found
No related merge requests found
...@@ -138,11 +138,12 @@ class User implements IUser { ...@@ -138,11 +138,12 @@ class User implements IUser {
*/ */
public function setDisplayName($displayName) { public function setDisplayName($displayName) {
$displayName = trim($displayName); $displayName = trim($displayName);
$oldDisplayName = $this->getDisplayName();
if ($this->backend->implementsActions(Backend::SET_DISPLAYNAME) && !empty($displayName)) { if ($this->backend->implementsActions(Backend::SET_DISPLAYNAME) && !empty($displayName)) {
$result = $this->backend->setDisplayName($this->uid, $displayName); $result = $this->backend->setDisplayName($this->uid, $displayName);
if ($result) { if ($result) {
$this->displayName = $displayName; $this->displayName = $displayName;
$this->triggerChange('displayName', $displayName); $this->triggerChange('displayName', $displayName, $oldDisplayName);
} }
return $result !== false; return $result !== false;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment