mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-22 13:29:21 +00:00
Fix conflict
This commit is contained in:
parent
dd99d9e5e1
commit
9ff14a1fcf
@ -172,7 +172,7 @@ pub fn check_security_answers(r: &mut HttpRequestHandler) -> RequestResult {
|
|||||||
|
|
||||||
/// Check the validity of a password reset token
|
/// Check the validity of a password reset token
|
||||||
pub fn check_password_reset_token(r: &mut HttpRequestHandler) -> RequestResult {
|
pub fn check_password_reset_token(r: &mut HttpRequestHandler) -> RequestResult {
|
||||||
let user_id = r.post_user_id_from_password_reset_token("token")?;
|
let user_id = r.post_user_id_from_password_reset_token("reset_token")?;
|
||||||
let user = user_helper::find_user_by_id(&user_id)?;
|
let user = user_helper::find_user_by_id(&user_id)?;
|
||||||
|
|
||||||
r.set_response(ResCheckPasswordToken::new(&user))
|
r.set_response(ResCheckPasswordToken::new(&user))
|
||||||
@ -180,7 +180,7 @@ pub fn check_password_reset_token(r: &mut HttpRequestHandler) -> RequestResult {
|
|||||||
|
|
||||||
/// Reset user password
|
/// Reset user password
|
||||||
pub fn reset_user_password(r: &mut HttpRequestHandler) -> RequestResult {
|
pub fn reset_user_password(r: &mut HttpRequestHandler) -> RequestResult {
|
||||||
let user_id = r.post_user_id_from_password_reset_token("token")?;
|
let user_id = r.post_user_id_from_password_reset_token("reset_token")?;
|
||||||
let new_password = r.post_string_opt("password", 3, true)?;
|
let new_password = r.post_string_opt("password", 3, true)?;
|
||||||
|
|
||||||
account_helper::change_password(&user_id, &new_password)?;
|
account_helper::change_password(&user_id, &new_password)?;
|
||||||
|
Loading…
Reference in New Issue
Block a user