Browse Source

lib/private/User: do not change user properties if value has not changed

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

+ 1
- 1
lib/private/User/User.php View File

@@ -139,7 +139,7 @@ class User implements IUser {
public function setDisplayName($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) && $displayName !== $oldDisplayName) {
$result = $this->backend->setDisplayName($this->uid, $displayName);
if ($result) {
$this->displayName = $displayName;

Loading…
Cancel
Save