The verifyadmin function in UserSpice is used to check if the user is an administrator and verify their admin status
The page to redirect to after verification.
// Call the verifyadmin function to check the user's admin status $page = "admin_dashboard";
In the example above, the verifyadmin function is called to check if the user is an administrator and verify their admin status. The $page variable is passed as an argument to the function to specify the page to redirect to after verification. If the user is not an administrator or their admin status needs to be verified, the function redirects them to the appropriate admin verification page (admin_pin.php or admin_verify.php). If the user is an administrator and their admin status is verified, the function updates the last_confirm session variable to the current time.
Note: The example usage assumes that the necessary global variables ($user and $us_url_root) are already defined in the scope where the verifyadmin function is called.