fix: fixed auth issues
Signed-off-by: limited_dev <loginakkisativ@gmail.com>
This commit is contained in:
parent
766e6054dc
commit
6630b4963e
11 changed files with 308 additions and 243 deletions
|
@ -13,7 +13,7 @@
|
|||
<span>Email: @mail</span>
|
||||
<br/>
|
||||
<span>Email: </span>
|
||||
<input type="email" id="email" @bind="newMail" />
|
||||
<input type="email" id="email" @bind="newMail"/>
|
||||
<a @onclick="changeEmail" href="javascript:void(0)">[Change Email]</a>
|
||||
<br/>
|
||||
<a href="/sys/resetpw">[Change Password]</a>
|
||||
|
@ -27,7 +27,7 @@
|
|||
</AuthorizeView>
|
||||
|
||||
@code {
|
||||
|
||||
|
||||
private string mail { get; set; } = "";
|
||||
private string newMail { get; set; }
|
||||
|
||||
|
@ -40,7 +40,7 @@
|
|||
mail = user.User.Identity.Name;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private async Task changeEmail()
|
||||
{
|
||||
var cauthStateProvder = (CustomAuthenticationStateProvider)authStateProvider;
|
||||
|
@ -51,7 +51,6 @@
|
|||
{
|
||||
return;
|
||||
}
|
||||
int userID = foundusr.UserID;
|
||||
if (newMail == null || newMail == "" || !newMail.Contains("@"))
|
||||
{
|
||||
return;
|
||||
|
@ -60,4 +59,5 @@
|
|||
foundusr.lastActionTimeStamp = DateTimeOffset.Now.ToUnixTimeMilliseconds();
|
||||
await UsersRepository.updateUserAsync(foundusr);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue