diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2016-02-09 18:37:41 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2016-02-09 18:37:41 +0100 |
commit | 03d0fb4e3f9734b36e015baa90901b222d03689c (patch) | |
tree | d8490ab4aed24e64a1fc3a18ddc468fdaa96d0cf /lib | |
parent | d19c47a381e478a59bb93acd2d75412ea3bfd11e (diff) | |
download | nextcloud-server-03d0fb4e3f9734b36e015baa90901b222d03689c.tar.gz nextcloud-server-03d0fb4e3f9734b36e015baa90901b222d03689c.zip |
revolutionar: change updates might even sent the new value (optional)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/server.php | 4 | ||||
-rw-r--r-- | lib/private/user/user.php | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/private/server.php b/lib/private/server.php index 9dfae860090..b52c5188a7b 100644 --- a/lib/private/server.php +++ b/lib/private/server.php @@ -244,9 +244,9 @@ class Server extends ServerContainer implements IServerContainer { $userSession->listen('\OC\User', 'logout', function () { \OC_Hook::emit('OC_User', 'logout', array()); }); - $userSession->listen('\OC\User', 'changeUser', function ($user, $feature) { + $userSession->listen('\OC\User', 'changeUser', function ($user, $feature, $value) { /** @var $user \OC\User\User */ - \OC_Hook::emit('OC_User', 'changeUser', array('run' => true, 'user' => $user, 'feature' => $feature)); + \OC_Hook::emit('OC_User', 'changeUser', array('run' => true, 'user' => $user, 'feature' => $feature, 'value' => $value)); }); return $userSession; }); diff --git a/lib/private/user/user.php b/lib/private/user/user.php index 5aea3f43c8c..cd9991796ec 100644 --- a/lib/private/user/user.php +++ b/lib/private/user/user.php @@ -141,7 +141,7 @@ class User implements IUser { $result = $this->backend->setDisplayName($this->uid, $displayName); if ($result) { $this->displayName = $displayName; - $this->triggerChange('displayName'); + $this->triggerChange('displayName', $displayName); } return $result !== false; } else { @@ -162,7 +162,7 @@ class User implements IUser { } else { $this->config->setUserValue($this->uid, 'settings', 'email', $mailAddress); } - $this->triggerChange('eMailAddress'); + $this->triggerChange('eMailAddress', $mailAddress); } /** @@ -366,7 +366,7 @@ class User implements IUser { $quota = OC_Helper::humanFileSize($quota); } $this->config->setUserValue($this->uid, 'files', 'quota', $quota); - $this->triggerChange('quota'); + $this->triggerChange('quota', $quota); } /** @@ -417,9 +417,9 @@ class User implements IUser { return $url; } - public function triggerChange($feature) { + public function triggerChange($feature, $value = null) { if ($this->emitter) { - $this->emitter->emit('\OC\User', 'changeUser', array($this, $feature)); + $this->emitter->emit('\OC\User', 'changeUser', array($this, $feature, $value)); } } |