Creating an ‘authenticate’ filter
-
What should the ‘authenticate’ filter(s) return for the login process to be aborted? Looking at the code on Trac, it looks like I can return an instance of WP_Error. But all I get when I do that is that the login process is successful and the user is logged in (correctly).
I setup the filter hook like so:
add_filter( 'authenticate', 'my_auth_check', 10, 3 );
And then in my_auth_check() return:
return( new WP_Error( 'invalid_username', 'The username is invalid' ) );
And this seems to have no effect whatsoever.
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘Creating an ‘authenticate’ filter’ is closed to new replies.