aboutsummaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorChristoph Wurst <ChristophWurst@users.noreply.github.com>2016-12-05 17:14:23 +0100
committerGitHub <noreply@github.com>2016-12-05 17:14:23 +0100
commit0478db6506d8b1c7bdc50cb3357e9c3ed01903b4 (patch)
treede53a0ac5fb6f3d1e59769ccae5f167c3493fef8 /settings
parentefa9ac1230b59eae4f3f508d8e986ee1af2460da (diff)
parentf25ad2e404ab70c2b62ebc43212293a6d6ac014f (diff)
downloadnextcloud-server-0478db6506d8b1c7bdc50cb3357e9c3ed01903b4.tar.gz
nextcloud-server-0478db6506d8b1c7bdc50cb3357e9c3ed01903b4.zip
Merge pull request #2484 from nextcloud/fix-wrong-update-of-email-address
make sure that we only update the email address if it really changed
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']
) {