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 170a783197..67a1934eba 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 @@ -2,6 +2,7 @@ using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Threading.Tasks; +using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; using Volo.Abp.Account.Web.Settings; using Volo.Abp.Identity; @@ -36,13 +37,8 @@ namespace Volo.Abp.Account.Web.Pages.Account var user = new IdentityUser(GuidGenerator.Create(), Input.UserName, Input.EmailAddress, CurrentTenant.Id); - var result = await UserManager.CreateAsync(user, Input.Password); - - if (!result.Succeeded) - { - throw new NotImplementedException(); - } - + (await UserManager.CreateAsync(user, Input.Password)).CheckErrors(); + await UserManager.SetEmailAsync(user, Input.EmailAddress); await SignInManager.SignInAsync(user, isPersistent: false); diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/_Layout.cshtml b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/_Layout.cshtml new file mode 100644 index 0000000000..a648fa61d1 --- /dev/null +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/_Layout.cshtml @@ -0,0 +1,8 @@ +@using Volo.Abp.AspNetCore.Mvc.UI.Theming +@inject IThemeManager ThemeManager +@{ + Layout = ThemeManager.CurrentTheme.GetAccountLayout(); +} +