Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-01-21 02:07:46 +0300
committerThomas Müller <thomas.mueller@tmit.eu>2016-01-21 02:07:46 +0300
commit2f7dcf1a2c7fb133c8ab7827a412dec2e205ac79 (patch)
treeb0a88f6fdbe34111c10909740e133f758267d984 /settings
parent647d8ea5decad8140f9c280ae90039aa71c4eb93 (diff)
parent77069f5582ad42207ee9a9620cba5720390d9e79 (diff)
Merge pull request #21782 from owncloud/update-system-addressbook-on-user-change-2
Introduce IUser::setEMailAddress and add hook mechanism
Diffstat (limited to 'settings')
-rw-r--r--settings/controller/userscontroller.php8
1 files changed, 2 insertions, 6 deletions
diff --git a/settings/controller/userscontroller.php b/settings/controller/userscontroller.php
index 695d72cfb5a..17629fe924f 100644
--- a/settings/controller/userscontroller.php
+++ b/settings/controller/userscontroller.php
@@ -373,7 +373,7 @@ class UsersController extends Controller {
* Send new user mail only if a mail is set
*/
if($email !== '') {
- $this->config->setUserValue($username, 'settings', 'email', $email);
+ $user->setEMailAddress($email);
// data for the mail template
$mailData = array(
@@ -545,11 +545,7 @@ class UsersController extends Controller {
}
// delete user value if email address is empty
- if($mailAddress === '') {
- $this->config->deleteUserValue($id, 'settings', 'email');
- } else {
- $this->config->setUserValue($id, 'settings', 'email', $mailAddress);
- }
+ $user->setEMailAddress($mailAddress);
return new DataResponse(
array(