forgot to look at src
This commit is contained in:
parent
69285c47e3
commit
aa792a0862
1 changed files with 2 additions and 2 deletions
|
@ -31,7 +31,7 @@ pub struct EmailSignupForm {
|
|||
}
|
||||
|
||||
fn emails_match(form: &EmailSignupForm) -> Result<(), ValidationError> {
|
||||
if form.email_confirmation == form.email {
|
||||
if form.email_confirmation.to_lowercase().eq(form.email.to_lowercase()) {
|
||||
Ok(())
|
||||
} else {
|
||||
Err(ValidationError::new("emails_match"))
|
||||
|
@ -193,7 +193,7 @@ pub fn signup(
|
|||
}
|
||||
let signup = EmailSignup::find_by_token(&conn, form.token.clone().into())
|
||||
.map_err(|_| Status::NotFound)?;
|
||||
if form.email != signup.email {
|
||||
if !form.email.to_lowercase().eq(signup.email.to_lowercase()) {
|
||||
let mut err = ValidationErrors::default();
|
||||
err.add("email", ValidationError::new("Email couldn't changed"));
|
||||
let form = NewUserForm {
|
||||
|
|
Loading…
Reference in a new issue