Created
September 15, 2023 11:30
-
-
Save webdados/d27602c96ba4cd012e66645ec790e1b4 to your computer and use it in GitHub Desktop.
Disable WordPress authentication entirely
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'authenticate', function( $user, $username ) { | |
return new WP_Error( 'foo', 'This account is disabled' ); | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment