Skip to content

Instantly share code, notes, and snippets.

@webdados
Created September 15, 2023 11:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save webdados/d27602c96ba4cd012e66645ec790e1b4 to your computer and use it in GitHub Desktop.
Save webdados/d27602c96ba4cd012e66645ec790e1b4 to your computer and use it in GitHub Desktop.
Disable WordPress authentication entirely
<?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