From 7cd632302b2869702564adb7ad79aa0fd887ed36 Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Wed, 20 Sep 2017 13:34:19 +0200 Subject: [PATCH] Only sync the email and username when UsernameIsEmail is true - U4-10435 Unable to Change Username (Reverts After Save) --- src/Umbraco.Web/Editors/UsersController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web/Editors/UsersController.cs b/src/Umbraco.Web/Editors/UsersController.cs index 5e45851108..2aa5319d9a 100644 --- a/src/Umbraco.Web/Editors/UsersController.cs +++ b/src/Umbraco.Web/Editors/UsersController.cs @@ -550,7 +550,7 @@ namespace Umbraco.Web.Editors // if the found user has his email for username, we want to keep this synced when changing the email. // we have already cross-checked above that the email isn't colliding with anything, so we can safely assign it here. - if (found.Username == found.Email && userSave.Username != userSave.Email) + if (UmbracoConfig.For.UmbracoSettings().Security.UsernameIsEmail && found.Username == found.Email && userSave.Username != userSave.Email) { userSave.Username = userSave.Email; }