summaryrefslogtreecommitdiffstats
path: root/settings/controller
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-05-05 11:58:19 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-05-05 11:58:19 +0200
commit5fd849f5457cd7f9d47c6fa5019ff0f79fcbc6af (patch)
tree15db87153ae2535ebac53d5cb70b5067e05e8dd5 /settings/controller
parent179472aeef78b8cf4eebbc0bb73c56581cb13825 (diff)
downloadnextcloud-server-5fd849f5457cd7f9d47c6fa5019ff0f79fcbc6af.tar.gz
nextcloud-server-5fd849f5457cd7f9d47c6fa5019ff0f79fcbc6af.zip
Allow user to set an empty email address
* fixes #16057
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(