From e583b37fd7c4c856dd4a2d12fd3c4f68d5f85bd2 Mon Sep 17 00:00:00 2001 From: maliming Date: Thu, 9 Nov 2023 09:39:20 +0800 Subject: [PATCH] Add `username` to social register page. --- .../src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml | 2 +- .../src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml index fabe41ae6f..745368402c 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml @@ -12,7 +12,7 @@ @L["Login"]
- @if ((!Model.IsExternalLogin || Model.UserNameExtracted) && Model.EnableLocalRegister) + @if (Model.EnableLocalRegister || Model.IsExternalLogin) { } diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs index 722eca26b7..322a17e82f 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs @@ -37,7 +37,6 @@ public class RegisterModel : AccountPageModel [BindProperty(SupportsGet = true)] public string ExternalLoginAuthSchema { get; set; } - public bool UserNameExtracted { get; set; } public IEnumerable ExternalProviders { get; set; } public IEnumerable VisibleExternalProviders => ExternalProviders.Where(x => !string.IsNullOrWhiteSpace(x.DisplayName)); public bool EnableLocalRegister { get; set; } @@ -128,7 +127,6 @@ public class RegisterModel : AccountPageModel { Input.UserName = await GetUserNameFromEmail(Input.EmailAddress); } - UserNameExtracted = true; await RegisterExternalUserAsync(externalLoginInfo, Input.UserName, Input.EmailAddress); } else