lib/private/User,apps/user_ldap/lib/User: always pass old value to User::triggerChange
This commit is contained in:
parent
ccabc63a09
commit
3eb0d4f1a4
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue