commit d3b4b10d18572ff0a6e1568481ec65f4317a4346
parent c031ae9f2fcf3440187a322202888dfd19fa644b
Author: Jean-Christophe BEGUE <jean-Christophe.begue@fraudbuster.mobi>
Date: Fri, 10 Aug 2018 16:59:23 +0200
Add a explaination to the password hint message #85
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/api/core/accounts.rs b/src/api/core/accounts.rs
@@ -263,7 +263,10 @@ fn password_hint(data: JsonUpcase<PasswordHintData>, conn: DbConn) -> EmptyResul
}
match User::find_by_mail(&data.Email, &conn) {
- Some(user) => err!(user.password_hint.to_owned().unwrap_or("".to_string())),
+ Some(user) => {
+ let hint = user.password_hint.to_owned().unwrap_or_default();
+ err!(format!("Your password hint is: {}", hint))
+ },
None => Ok(()),
}
}