aboutsummaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorBjoern Schiessle <bjoern@schiessle.org>2016-12-02 16:54:17 +0100
committerBjoern Schiessle <bjoern@schiessle.org>2016-12-02 18:07:08 +0100
commitf25ad2e404ab70c2b62ebc43212293a6d6ac014f (patch)
treedb71f4f7b0afd310494b95d92ac3c600a13b48be /settings
parentbc597b184306aa39a48963cb9a8015354c6e2ce2 (diff)
downloadnextcloud-server-f25ad2e404ab70c2b62ebc43212293a6d6ac014f.tar.gz
nextcloud-server-f25ad2e404ab70c2b62ebc43212293a6d6ac014f.zip
make sure that we only update the email address if it really changed
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'settings')
-rw-r--r--settings/Controller/UsersController.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/settings/Controller/UsersController.php b/settings/Controller/UsersController.php
index 20440e6d395..28b8d2648d9 100644
--- a/settings/Controller/UsersController.php
+++ b/settings/Controller/UsersController.php
@@ -605,6 +605,7 @@ class UsersController extends Controller {
// keep the user back-end up-to-date with the latest display name and email
// address
$oldDisplayName = $user->getDisplayName();
+ $oldDisplayName = is_null($oldDisplayName) ? '' : $oldDisplayName;
if (isset($data[AccountManager::PROPERTY_DISPLAYNAME]['value'])
&& $oldDisplayName !== $data[AccountManager::PROPERTY_DISPLAYNAME]['value']
) {
@@ -615,6 +616,7 @@ class UsersController extends Controller {
}
$oldEmailAddress = $user->getEMailAddress();
+ $oldEmailAddress = is_null($oldEmailAddress) ? '' : $oldEmailAddress;
if (isset($data[AccountManager::PROPERTY_EMAIL]['value'])
&& $oldEmailAddress !== $data[AccountManager::PROPERTY_EMAIL]['value']
) {