diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2017-04-14 08:16:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-14 08:16:43 +0200 |
commit | f40b9fa9bd03b9c9590976eefa21aba7085f32f2 (patch) | |
tree | 5692c1b28e4db2394dfd92c9d6aa8006d769e076 /lib/private/User | |
parent | 6b79bf09601122f07f006e49459b362548e1b118 (diff) | |
parent | 8e8b345fbdc531c7888ab279a88f52499e5bbb77 (diff) | |
download | nextcloud-server-f40b9fa9bd03b9c9590976eefa21aba7085f32f2.tar.gz nextcloud-server-f40b9fa9bd03b9c9590976eefa21aba7085f32f2.zip |
Merge pull request #4330 from nextcloud/activities-for-password-mail-change
Add activities when email or password is changed
Diffstat (limited to 'lib/private/User')
-rw-r--r-- | lib/private/User/User.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/private/User/User.php b/lib/private/User/User.php index bca9c46bfd0..a3be0c24bb9 100644 --- a/lib/private/User/User.php +++ b/lib/private/User/User.php @@ -158,12 +158,13 @@ class User implements IUser { * @since 9.0.0 */ public function setEMailAddress($mailAddress) { + $oldMailAddress = $this->getEMailAddress(); if($mailAddress === '') { $this->config->deleteUserValue($this->uid, 'settings', 'email'); } else { $this->config->setUserValue($this->uid, 'settings', 'email', $mailAddress); } - $this->triggerChange('eMailAddress', $mailAddress); + $this->triggerChange('eMailAddress', $mailAddress, $oldMailAddress); } /** @@ -435,9 +436,9 @@ class User implements IUser { return $url; } - public function triggerChange($feature, $value = null) { + public function triggerChange($feature, $value = null, $oldValue = null) { if ($this->emitter) { - $this->emitter->emit('\OC\User', 'changeUser', array($this, $feature, $value)); + $this->emitter->emit('\OC\User', 'changeUser', array($this, $feature, $value, $oldValue)); } } } |