Setting eingebaut um umschalten zu können, ob Registrieren erlaubt ist
This commit is contained in:
1 parent
68ba7280c8
commit
626f6a88ce
5 files changed
+31
-3
No files matched your search
@@ -4,11 +4,13 @@
|
||||
@using Microsoft.AspNetCore.Authentication
|
||||
@using Microsoft.AspNetCore.Identity
|
||||
@using FWLAZ_Web.Data
|
||||
@using Microsoft.Extensions.Options
|
||||
|
||||
@inject SignInManager<IdentityUser> SignInManager
|
||||
@inject ILogger<Login> Logger
|
||||
@inject NavigationManager NavigationManager
|
||||
@inject IdentityRedirectManager RedirectManager
|
||||
@inject IOptions<AppSettings> Config;
|
||||
|
||||
<PageTitle>Log in</PageTitle>
|
||||
|
||||
@@ -45,9 +47,12 @@
|
||||
<p>
|
||||
<a href="Account/ForgotPassword">Forgot your password?</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="@(NavigationManager.GetUriWithQueryParameters("Account/Register", new Dictionary<string, object?> { ["ReturnUrl"] = ReturnUrl }))">Register as a new user</a>
|
||||
</p>
|
||||
@if (Config.Value.RegistrationEnabled)
|
||||
{
|
||||
<p>
|
||||
<a href="@(NavigationManager.GetUriWithQueryParameters("Account/Register", new Dictionary<string, object?> { ["ReturnUrl"] = ReturnUrl }))">Register as a new user</a>
|
||||
</p>
|
||||
}
|
||||
<p>
|
||||
<a href="Account/ResendEmailConfirmation">Resend email confirmation</a>
|
||||
</p>
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
@using Microsoft.AspNetCore.Identity
|
||||
@using Microsoft.AspNetCore.WebUtilities
|
||||
@using FWLAZ_Web.Data
|
||||
@using Microsoft.Extensions.Options
|
||||
|
||||
@inject UserManager<IdentityUser> UserManager
|
||||
@inject IUserStore<IdentityUser> UserStore
|
||||
@@ -14,9 +15,17 @@
|
||||
@inject ILogger<Register> Logger
|
||||
@inject NavigationManager NavigationManager
|
||||
@inject IdentityRedirectManager RedirectManager
|
||||
@inject IOptions<AppSettings> Config;
|
||||
|
||||
|
||||
<PageTitle>Register</PageTitle>
|
||||
|
||||
@if (!Config.Value.RegistrationEnabled)
|
||||
{
|
||||
RedirectManager.RedirectTo("/");
|
||||
}
|
||||
|
||||
|
||||
<h1>Register</h1>
|
||||
|
||||
<div class="row">
|
||||
|
||||
Reference in new issue
Block a user