Description
This function lists the databases for which a user has authorization.
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 |
|
array of hashes |
An array of hashes that contain information about a database user and the user's authorized databases. |
Each hash contains the dbuser and dbsreturns. |
|
dbuser |
string |
The database user's name. The function returns this value in the unnamed hash. |
A valid username. |
example_user1 |
dbs |
array |
A list of the user's authorized databases. The function returns this value in the unnamed hash. |
A valid database name or names. |
example_database |
reason |
string |
A reason for failure. Note: This function only returns a reasonvalue if it failed. |
A string that describes the error. |
This is an error message. |
result |
Boolean |
Whether the function succeeded. |
|
1 |