Version: 3.3 Restrict the usernames that new users may use when registering for your site.
The plugin exposes one filter for hooking. Typically, customizations utilizing this hook would be put into your active theme's functions.php file, or used by another plugin.
The 'c2c_restrict_usernames-validate' hook allows you to add your own customized checks for the username being registered. You can add additional restrictions or override the assessment performed by the plugin.
Arguments:
Example:
/**
* Add custom checks on usernames.
*
* Specifically, prevent use of usernames ending in numbers.
*/
function my_restrict_usernames_check( $valid, $username, $options ) {
// Only do additional checking if the plugin has already performed its
// checks and deemed the username valid.
if ( $valid ) {
// Don't allow usernames to end in numbers.
if ( preg_match( '/[0-9]+$/', $username ) )
$valid = false;
}
return $valid;
}
add_filter( 'c2c_restrict_usernames-validate', 'my_restrict_usernames_check', 10, 3 );
Requires: 3.1 or higher
Compatible up to: 3.4.2
Last Updated: 2012-12-7
Downloads: 6,979
0 of 2 support threads in the last two months have been resolved.
Got something to say? Need help?