mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-11-23 22:09:29 +00:00
API clients can check if an account with an email address links to an account with security questions defined or not.
This commit is contained in:
parent
2a397c20aa
commit
7a4d11d71f
@ -80,6 +80,23 @@ class accountController {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if an account associated with an email address has set up
|
||||||
|
* security question or not
|
||||||
|
*
|
||||||
|
* @url POST /account/has_security_questions
|
||||||
|
*/
|
||||||
|
public function hasSecurityQuestion(){
|
||||||
|
|
||||||
|
//Get account ID
|
||||||
|
$userID = $this->getUserIDFromPostEmail("email");
|
||||||
|
|
||||||
|
//Check if the specified account has defined security questions or not
|
||||||
|
return array(
|
||||||
|
"defined" => components()->settings->has_security_questions($userID)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create an account
|
* Create an account
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user