Browse Source

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

tags/v16.0.0RC1
Leon Klingele 5 years ago
parent
commit
3eb0d4f1a4
No account linked to committer's email address
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      lib/private/User/User.php

+ 2
- 1
lib/private/User/User.php View 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;
}

Loading…
Cancel
Save