Does anyone know the add_action() hook to use immediately after a user is successfully authenticated.

Hook Test based on @mmm's answer

I ran this test from my mu-plugins.php file:

function check_for_superAdmin() {
    if ( is_super_admin() ) { echo 'I\'m a Super Admin !'; exit; }
add_action( 'wp_login', 'check_for_superAdmin' );

the check_for_superAdmin() function works but the is_super_admin() function does not. I may need to pass a parameter in there. Checking....


1 Answer 1


juste before testing login and password, you have the action wp_authenticate: https://codex.wordpress.org/Plugin_API/Action_Reference/wp_authenticate

juste after test and only if logging is successful, the action wp_login: https://codex.wordpress.org/Plugin_API/Action_Reference/wp_login

and after logging, you can also modify the URL with the filter login_redirect: https://codex.wordpress.org/Plugin_API/Filter_Reference/login_redirect

  • It did not work @mmm
    – tammy
    Aug 5, 2015 at 21:07
  • maybe is it waiting for the working contract ?
    – mmm
    Aug 5, 2015 at 21:11
  • Sorry @mmm, it actually does work. it is my is_super_admin() function that did not work.
    – tammy
    Aug 5, 2015 at 21:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.