Skip to content

Instantly share code, notes, and snippets.

@thierrypigot
Last active June 10, 2016 16:38
Show Gist options
  • Save thierrypigot/90a97fdf84b033b72b32ca3ebfced2c1 to your computer and use it in GitHub Desktop.
Save thierrypigot/90a97fdf84b033b72b32ca3ebfced2c1 to your computer and use it in GitHub Desktop.
Disallow "admin" as username
<?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