Display error message if user reset password with an email that is not registered in the system.
Is your feature request related to a problem? Please describe. If the user resets the password and then enters the wrong email when clicking the "send reset email" button, there is no notification telling the user that the email is not registered in the system. its doing nothing.
Describe the solution you'd like
option 1. add unique email validation for staff something like exists:lunar_staff,email
option 2. use custom validation error message something like this
public function sendResetEmail()
{
$this->validate();
$staff = Staff::whereEmail($this->email)->first();
if (is_null($staff)) {
$this->addError('email', 'The email address you entered is not registered with us.');
}
// ...
}
Isn’t it common practice to report back that an email has been sent regardless of it exists, not to tell the end user that it does or doesn’t exist.
Isn’t it common practice to report back that an email has been sent regardless of it exists, not to tell the end user that it does or doesn’t exist.
yes i agreed. but the current lunar when the user enters the wrong email there is no report back to the user. only if the user filled the correct email then there is a success notification Password reset sent.