FIX: ignore case for e-mail address in password resets
This commit is contained in:
parent
5c7432de13
commit
5d9ac3e002
|
@ -15,7 +15,7 @@ pub struct PasswortResetMail{
|
||||||
|
|
||||||
/// Checks if email belongs to user, if so resets password
|
/// Checks if email belongs to user, if so resets password
|
||||||
pub fn request_password_reset(settings: &State<Settings>, mt: &State<MailTemplates>, mq: &State<Arc<MailQueue>>, email: String) -> Result<(), ()>{
|
pub fn request_password_reset(settings: &State<Settings>, mt: &State<MailTemplates>, mq: &State<Arc<MailQueue>>, email: String) -> Result<(), ()>{
|
||||||
let user = match get_user_by_email(email.clone().to_ascii_lowercase(), settings){ //Check if email belongs to user, if not return
|
let user = match get_user_by_email(email.clone(), settings){ //Check if email belongs to user, if not return
|
||||||
Some(user) => user,
|
Some(user) => user,
|
||||||
None => return Ok(()),
|
None => return Ok(()),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue