This plugin allows you to restrict the usernames that new users may use when registering for your site.
If open registration is enabled for your site (via Settings -> General -> Membership (“Anyone can register”)), WordPress allows visitors to register for an account on your blog. By default, any username they choose is allowed so long as it isn’t an already existing account and it doesn’t include invalid (i.e. non-alphanumeric) characters.
Possible reasons for wanting to restrict certain usernames:
When attempting to register with a restricted username, the visitor will be given an error notice that says:
ERROR: This username is invalid. Please enter a valid username.
NOTE: This plugin does not put any restrictions on usernames that the admin chooses for users when creating user accounts from within the WordPress admin. This only restricts the names that users choose themselves when registering for your site.
SPECIAL NOTE: Many membership plugins implement their own user registration handling that often bypasses checks (and hooks) performed by WordPress. As such, it is unlikely that the plugin is compatible with them without special plugin-specific amendments.
Compatible with Multisite and BuddyPress as well.
Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage
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.
c2c_restrict_usernames-validate (filter)
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. * * @param bool $valid True if the username is valid, false if not. * @param string $username The username. * @param array $options Plugin options. */ 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 );
Starting from $0 per month.
Rating
Reviewers
14 reviews
Tags
Developed By
Scott Reilly
Quick & Easy
Common Ninja has a large selection of powerful Wordpress plugins that are easy to use, fully customizable, mobile-friendly and rich with features — so be sure to check them out!
Testimonial plugins for Wordpress
Contact Form plugins for Wordpress
Maps plugins for Wordpress
Translation plugins for Wordpress
Chat plugins for Wordpress
Slider plugins for Wordpress
Reviews plugins for Wordpress
Contact plugins for Wordpress
Galleries plugins for Wordpress
SEO plugins for Wordpress
Forms plugins for Wordpress
Comments plugins for Wordpress
Backup plugins for Wordpress
Privacy plugins for Wordpress
Optimize plugins for Wordpress
Tabs plugins for Wordpress
Social Sharing plugins for Wordpress
Events Calendar plugins for Wordpress
Comments plugins for Wordpress
Social Feeds plugins for Wordpress
Social Sharing plugins for Wordpress
Portfolio plugins for Wordpress
Video Player plugins for Wordpress
popup plugins for Wordpress
SiteMap plugins for Wordpress
Payment plugins for Wordpress
Coming Soon plugins for Wordpress
Inventory plugins for Wordpress
Testimonials plugins for Wordpress
Portfolio plugins for Wordpress
Membership plugins for Wordpress
Forms plugins for Wordpress
Analytics plugins for Wordpress
Events Calendar plugins for Wordpress
Sliders plugins for Wordpress
Analytics plugins for Wordpress
Reviews plugins for Wordpress
Security plugins for Wordpress
Ads plugins for Wordpress
Music Player plugins for Wordpress
Countdown plugins for Wordpress
Email Marketing plugins for Wordpress
Membership plugins for Wordpress
Ecommerce plugins for Wordpress
Customer Support plugins for Wordpress
Video Player plugins for Wordpress
Tabs plugins for Wordpress
Social Feeds plugins for Wordpress
Common Ninja Apps
Browse our extensive collection of compatible plugins, and easily embed them on any website, blog, online store, e-commerce platform, or site builder.
Improve User Experience & Collect Leads
Simplify the Checkout Process and Boost Sales
Boost Trust and Enhance Credibility to Elevate Sales
Draw Attention to CTAs & Increase Conversions
Display LinkedIn Posts in a Dynamic and Interactive Carousel
Effortless Mega Footer Creation for Modern Websites
Present Information in an Organized, Visually Appealing Manner
Enhance Customer Experience With the Company Branch Flip Cards Widget
Streamline Your Customer Support With Ease
Add Engaging Elements to Your Videos Easily
Explore New Dimensions with Interactive 360 Panoramic Tours
Boost engagement, increase conversions, and captivate visitors
More plugins
The Common Ninja Search Engine platform helps website builders find the best site widgets, apps, plugins, tools, add-ons, and extensions! Compatible with all major website building platforms - big or small - and updated regularly, our Search Engine tool provides you with the business tools your site needs!