From d7497314132cbbb67a500fbaffd9e4036a97b09f Mon Sep 17 00:00:00 2001 From: Lucas Bach Bisgaard Date: Sun, 22 Oct 2023 19:25:51 +0200 Subject: [PATCH] Condition on the userState instead of the dates. (#14950) Co-authored-by: Lucas Bach Bisgaard --- src/Umbraco.Web.BackOffice/Controllers/UsersController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.BackOffice/Controllers/UsersController.cs b/src/Umbraco.Web.BackOffice/Controllers/UsersController.cs index 5ba735c98b..c855a87ea4 100644 --- a/src/Umbraco.Web.BackOffice/Controllers/UsersController.cs +++ b/src/Umbraco.Web.BackOffice/Controllers/UsersController.cs @@ -532,7 +532,7 @@ public class UsersController : BackOfficeNotificationsController { // first validate the username if we're showing it ActionResult userResult = CheckUniqueUsername(userSave.Username, - u => u.LastLoginDate != default || u.EmailConfirmedDate.HasValue); + u => u.UserState != UserState.Invited); if (userResult.Result is not null) { return userResult.Result; @@ -540,7 +540,7 @@ public class UsersController : BackOfficeNotificationsController } IUser? user = CheckUniqueEmail(userSave.Email, - u => u.LastLoginDate != default || u.EmailConfirmedDate.HasValue); + u => u.UserState != UserState.Invited); if (ModelState.IsValid == false) {