feat: added informatic output to the ResetPassword page
Signed-off-by: limited_dev <loginakkisativ@gmail.com>
This commit is contained in:
parent
9c93f9d10c
commit
993c3c1a63
1 changed files with 7 additions and 1 deletions
|
@ -27,12 +27,16 @@
|
||||||
|
|
||||||
private async void resetPassword()
|
private async void resetPassword()
|
||||||
{
|
{
|
||||||
Console.WriteLine("Resetting Password...");
|
msg = "Checking...";
|
||||||
var user = await UsersRepository.getUserByEmailRawAsync(Email);
|
var user = await UsersRepository.getUserByEmailRawAsync(Email);
|
||||||
if (user == null)
|
if (user == null)
|
||||||
{
|
{
|
||||||
|
msg = "This user is not registered.";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Console.WriteLine("Resetting a password...");
|
||||||
|
|
||||||
|
msg = "Generating";
|
||||||
|
|
||||||
var hash = TheManager.getmd5Hash();
|
var hash = TheManager.getmd5Hash();
|
||||||
user.ResetPasswordToken = hash;
|
user.ResetPasswordToken = hash;
|
||||||
|
@ -40,6 +44,8 @@
|
||||||
|
|
||||||
await UsersRepository.updateUserAsync(user);
|
await UsersRepository.updateUserAsync(user);
|
||||||
|
|
||||||
|
msg = "Sending...";
|
||||||
|
|
||||||
Postman.sendMail(user.Email,
|
Postman.sendMail(user.Email,
|
||||||
"Password Reset",
|
"Password Reset",
|
||||||
"Reset your Password using this link:\n" +
|
"Reset your Password using this link:\n" +
|
||||||
|
|
Loading…
Reference in a new issue