Description
This function creates a temporary user session. In earlier versions of cPanel & WHM, the system created temporary MySQL®/MariaDB users whenever a user logged in to cPanel via external session creation instead of password authentication. This caused high load and performance issues on systems with frequent logins.
As of cPanel & WHM version 54, the system no longer created temporary users for external session logins until a script or user accessed thephpMyAdmin feature or the backup functionality.
Third-party plugins that require access to temporary MySQL users (found in $ENV{'REMOTE_DBOWNER'}
) will now need to call theSession::create_temp_user
function in order to create the temporary users before they are available.
Important:
If you cannot update your system for whatever reason, the workaround is to update your scripts to call cPanel API 1 Functions -Cgi::phpmyadminlink
, which will create a temporary user session for you.
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 |
created |
Boolean |
Whether the function successfully created the temporary user session. |
|
1 |
session_temp_user |
string |
The temporary user's session ID. |
A positive integer. |
cpses_reviY3ZSQK |