From 37d88be2be484ab044d0954600049909876348ef Mon Sep 17 00:00:00 2001 From: Jean-Christophe BEGUE Date: Tue, 11 Sep 2018 13:12:24 +0200 Subject: [PATCH] return an error when email adress for password hint is not valid --- src/api/core/accounts.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/core/accounts.rs b/src/api/core/accounts.rs index 11b7700..2f66b20 100644 --- a/src/api/core/accounts.rs +++ b/src/api/core/accounts.rs @@ -264,7 +264,7 @@ fn password_hint(data: JsonUpcase, conn: DbConn) -> EmptyResul let data: PasswordHintData = data.into_inner().data; if !is_valid_email(&data.Email) { - return Ok(()); + return err!("This email address is not valid..."); } let user = User::find_by_mail(&data.Email, &conn);