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:
Pierre 2018-05-21 11:17:07 +02:00
parent 2a397c20aa
commit 7a4d11d71f

View File

@ -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
*