display verification message instead of redirecting new user before email verification
This commit is contained in:
@ -8,6 +8,8 @@
|
||||
@inject ISettingService SettingService
|
||||
|
||||
@if (PageState.Site.AllowRegistration)
|
||||
{
|
||||
if (!_userCreated)
|
||||
{
|
||||
<AuthorizeView Roles="@RoleNames.Registered">
|
||||
<Authorizing>
|
||||
@ -64,6 +66,7 @@
|
||||
</NotAuthorized>
|
||||
</AuthorizeView>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<ModuleMessage Message="@Localizer["Info.Registration.Disabled"]" Type="MessageType.Info" />
|
||||
@ -80,6 +83,7 @@ else
|
||||
private string _confirm = string.Empty;
|
||||
private string _email = string.Empty;
|
||||
private string _displayname = string.Empty;
|
||||
private bool _userCreated = false;
|
||||
|
||||
public override SecurityAccessLevel SecurityAccessLevel => SecurityAccessLevel.Anonymous;
|
||||
|
||||
@ -121,15 +125,9 @@ else
|
||||
if (user != null)
|
||||
{
|
||||
await logger.LogInformation("User Created {Username} {Email}", _username, _email);
|
||||
if (PageState.QueryString.ContainsKey("returnurl"))
|
||||
{
|
||||
NavigationManager.NavigateTo(WebUtility.UrlDecode(PageState.QueryString["returnurl"]));
|
||||
}
|
||||
else // legacy behavior
|
||||
{
|
||||
_userCreated = true;
|
||||
AddModuleMessage(Localizer["Info.User.AccountCreate"], MessageType.Info);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
await logger.LogError("Error Adding User {Username} {Email}", _username, _email);
|
||||
|
Reference in New Issue
Block a user