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() 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" +