feat: added informatic output to the ResetPassword page

Signed-off-by: limited_dev <loginakkisativ@gmail.com>
This commit is contained in:
limited_dev 2023-06-12 12:27:27 +02:00
parent 9c93f9d10c
commit 993c3c1a63

View file

@ -27,12 +27,16 @@
private async void resetPassword()
{
Console.WriteLine("Resetting Password...");
msg = "Checking...";
var user = await UsersRepository.getUserByEmailRawAsync(Email);
if (user == null)
{
msg = "This user is not registered.";
return;
}
Console.WriteLine("Resetting a password...");
msg = "Generating";
var hash = TheManager.getmd5Hash();
user.ResetPasswordToken = hash;
@ -40,6 +44,8 @@
await UsersRepository.updateUserAsync(user);
msg = "Sending...";
Postman.sendMail(user.Email,
"Password Reset",
"Reset your Password using this link:\n" +