Description
This function retrieves a specified set of security questions and answers.
Warning:
We strongly recommend that you use UAPI instead of cPanel API 2. However, no equivalent UAPI function exists.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
This function does not accept parameters.
Returns
Return |
Type |
Description |
Possible values |
Example |
question |
string |
The security question. |
Any of the account's security questions. |
What was the name of your first pet? |
options |
array of hashes |
A array of hashes of information for each possible question. Note: This function returns seven lists of hashes for each question. |
This hash contains the questionnumand selectedtxt returns. |
|
questionnum |
integer |
The security question's number. The function returns this value in theoptions hash. |
Any positive integer. |
1 |
selectedtxt |
string |
The security question's text. The function returns this value in theoptions hash. |
|
"" |
answer |
string |
The security question's answer. Note: This return outputs null unless you specify a value in the q*answerparameter. |
The question's answer. |
Snowball2 |
reason |
string |
A reason for failure. Note: This function only returns a reasonvalue if there was an error. |
A string that describes the error. |
This is an error message. |
result |
Boolean |
Whether the function succeeded. |
|
1 |