Last active
June 10, 2016 16:38
-
-
Save thierrypigot/90a97fdf84b033b72b32ca3ebfced2c1 to your computer and use it in GitHub Desktop.
Disallow "admin" as username
This file contains hidden or 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('validate_username' , 'tp_deny_admin_username', 10, 2); | |
| function tp_deny_admin_username($valid, $username ) | |
| { | |
| if( 'admin' == $username ) { | |
| $valid = false; | |
| } | |
| return $valid; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment