diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2017-06-01 11:23:46 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2017-06-01 11:34:17 +0200 |
commit | 999455c1aa8fc4a02a2fd778cd25fe3e4a1843ac (patch) | |
tree | b6e79e5eae7acbc40d14a424bf76b35a16cf615f /lib | |
parent | 8801b68d45443f9b4abd001bd6e804a32390d12f (diff) | |
download | nextcloud-server-999455c1aa8fc4a02a2fd778cd25fe3e4a1843ac.tar.gz nextcloud-server-999455c1aa8fc4a02a2fd778cd25fe3e4a1843ac.zip |
emit changeUser only if there really was a change (quota, displayname)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/User/User.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/private/User/User.php b/lib/private/User/User.php index 5e5d3f0d772..645f7b8e59c 100644 --- a/lib/private/User/User.php +++ b/lib/private/User/User.php @@ -165,7 +165,9 @@ class User implements IUser { } else { $this->config->setUserValue($this->uid, 'settings', 'email', $mailAddress); } - $this->triggerChange('eMailAddress', $mailAddress, $oldMailAddress); + if($oldMailAddress !== $mailAddress) { + $this->triggerChange('eMailAddress', $mailAddress, $oldMailAddress); + } } /** @@ -388,12 +390,15 @@ class User implements IUser { * @since 9.0.0 */ public function setQuota($quota) { + $oldQuota = $this->config->getUserValue($this->uid, 'files', 'quota', ''); if($quota !== 'none' and $quota !== 'default') { $quota = OC_Helper::computerFileSize($quota); $quota = OC_Helper::humanFileSize($quota); } $this->config->setUserValue($this->uid, 'files', 'quota', $quota); - $this->triggerChange('quota', $quota); + if($quota !== $oldQuota) { + $this->triggerChange('quota', $quota); + } } /** |