This script handles the decline of user requests for admin rights by updating the value of admin
column in users database.
More...
Functions | |
terminateDeclineAdminWithError ($errorParam) | |
Variables | |
if(isset($error)) | try |
This script handles the decline of user requests for admin rights by updating the value of admin
column in users database.
Connects to the database and updates the value of 'admin_requested' column of 'users' table of the database back 0, thus giving back the ability to the user to make another request for the admin rights. The 'admin' column value (0) stays unchanged, as the request for the admin rights is declined in this case. Terminates in case of connection- or update- error and redirects to the main page with an error context info as a parameter of the redirecting GET request.
terminateDeclineAdminWithError | ( | $errorParam | ) |
Redirects the user to a specified location with an error parameter.
string | $errorParam | The error parameter to append to the URL. |
Handles PDO exceptions by redirecting with an error parameter.
if (isset( $error)) try |
Checks if an error occurred during database connection and redirects with an error parameter.