
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
Galleries plugins for Wordpress
SEO plugins for Wordpress
Contact Form plugins for Wordpress
Forms plugins for Wordpress
Social Feeds plugins for Wordpress
Social Sharing plugins for Wordpress
Events Calendar plugins for Wordpress
Sliders plugins for Wordpress
Analytics plugins for Wordpress
Reviews plugins for Wordpress
Comments plugins for Wordpress
Portfolio plugins for Wordpress
Maps plugins for Wordpress
Security plugins for Wordpress
Translation plugins for Wordpress
Ads plugins for Wordpress
Video Player plugins for Wordpress
Music Player plugins for Wordpress
Backup plugins for Wordpress
Privacy plugins for Wordpress
Optimize plugins for Wordpress
Chat plugins for Wordpress
Countdown plugins for Wordpress
Email Marketing plugins for Wordpress
Tabs plugins for Wordpress
Membership plugins for Wordpress
popup plugins for Wordpress
SiteMap plugins for Wordpress
Payment plugins for Wordpress
Coming Soon plugins for Wordpress
Ecommerce plugins for Wordpress
Customer Support plugins for Wordpress
Inventory plugins for Wordpress
Video Player plugins for Wordpress
Testimonials plugins for Wordpress
Tabs plugins for Wordpress
Social Sharing plugins for Wordpress
Social Feeds plugins for Wordpress
Slider plugins for Wordpress
Reviews plugins for Wordpress
Portfolio plugins for Wordpress
Membership plugins for Wordpress
Forms plugins for Wordpress
Events Calendar plugins for Wordpress
Contact plugins for Wordpress
Comments plugins for Wordpress
Analytics 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.
Show Bluesky posts with a Bluesky feed that updates in real time, improves content discovery, and keeps visitors engaged with fresh activity.
Show Vimeo videos with a Vimeo carousel that displays clips in a smooth, flexible layout to boost visibility and engagement.
Create interactive polls with a poll widget that gathers real time feedback, boosts engagement, and helps you understand visitor opinions quickly and clearly.
Show Reddit posts with a Reddit feed that updates automatically, improves content discovery, and keeps visitors engaged with fresh discussions.
Add interactive stories to your site to showcase content in a visual, mobile friendly format that boosts engagement and guides visitors toward action.
Showcase content with a card slider that presents images, text, and buttons in a smooth, customizable layout to keep visitors engaged.
Add an interactive spinning wheel to offer prizes, capture leads, and drive user engagement through gamified rewards.

An Info List presents key details in a clear, structured format to improve user experience and support conversions.
Create interactive infographics with a ratio widget that uses custom icons, dynamic tooltips, and clear visuals to help visitors understand data quickly.
Bracket generator for creating interactive tournaments that organize matchups, track progress, and deliver a clear and engaging competition experience.
Add customizable content cards to your site to display structured information clearly with flexible layout and design options.
Display and manage customer reviews from multiple platforms in one place to build trust and highlight brand credibility.
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!
