summaryrefslogtreecommitdiffstats
path: root/settings/controller
diff options
context:
space:
mode:
Diffstat (limited to 'settings/controller')
-rw-r--r--settings/controller/userscontroller.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/settings/controller/userscontroller.php b/settings/controller/userscontroller.php
index 46782a0cace..e9ffc36904e 100644
--- a/settings/controller/userscontroller.php
+++ b/settings/controller/userscontroller.php
@@ -504,7 +504,12 @@ class UsersController extends Controller {
);
}
- $this->config->setUserValue($id, 'settings', 'email', $mailAddress);
+ // delete user value if email address is empty
+ if($mailAddress === '') {
+ $this->config->deleteUserValue($id, 'settings', 'email');
+ } else {
+ $this->config->setUserValue($id, 'settings', 'email', $mailAddress);
+ }
return new DataResponse(
array(