WordPress.org

Plugin Directory

Test out the new Plugin Directory and let us know what you think.

Restrict Usernames

Restrict the usernames that new users may use when registering for your site.

3.6 (2016-05-03)

Highlights:

  • This release largely consists of minor behind-the-scenes changes.

Details:

  • Change: Update plugin framework to 042:
    • Change class name to c2c_RestrictUsernames_Plugin_042 to be plugin-specific.
    • Set textdomain using a string instead of a variable.
    • Don't load textdomain from file.
    • Change admin page header from 'h2' to 'h1' tag.
    • Add c2c_plugin_version().
    • Formatting improvements to inline docs.
  • Change: Add support for language packs:
    • Set textdomain using a string instead of a variable.
    • Remove .pot file and /lang subdirectory.
  • Change: Amend description for max_length setting to indicate WP already enforces a max length of 60, which the plugin cannot increase.
  • New: Hook 'illegal_user_logins' filter to add in usernames explicitly prohibited by the plugin.
  • New: Add special note and FAQ item to readme indicating the likely lack of compatibility with membership plugins that have custom registration handling.
  • Change: Declare class as final.
  • Change: Explicitly declare methods in unit tests as public or protected.
  • Change: Minor code reformatting.
  • Change: Minor improvements to inline docs and test docs.
  • Change: Prevent web invocation of unit test bootstrap.php.
  • New: Add LICENSE file.
  • New: Create empty index.php to prevent files from being listed if web server has enabled directory listings.
  • Change: Note compatibility through WP 4.5+.
  • Change: Remove support for versions of WordPress older than 4.1.
  • Change: Update copyright date (2016).

3.5.1 (2015-04-16)

  • Bugfix: compatibility fix for versions of WP older than 4.1; $error->remove() was introduced in 4.1

3.5 (2015-02-20)

  • Fix error message handling to override misleading default WP registration error message
  • Update plugin framework to 039
  • Add more unit tests
  • Explicitly declare activation() and uninstall() static
  • Reformat plugin header
  • Change documentation links to wp.org to be https
  • Minor documentation spacing changes throughout
  • Note compatibility through WP 4.1+
  • Update copyright date (2015)
  • Add plugin icon
  • Add Russian translation. props Kolya Korobochkin
  • Regenerate .pot

3.4.1 (2014-01-15)

  • Bugfix to prevent plugin from causing admin error/notice messages to appear twice

3.4 (2014-01-14)

  • Fix to display settings page update messages and username test tool results
  • Add setting to optionally enforce minimum length for usernames
  • Add setting to optionally enforce maximum length for usernames
  • Improve display of username test tool results:
    • Display as list
    • Color-code results as green or red
    • Make 'valid' and 'invalid' translatable
  • Add is_buddypress() to determine if BuddyPress's user validation checks are being used
  • Move descriptive text from top of settings page into Help panel under new 'About' tab
  • Add unit tests
  • Update plugin framework to 037
  • Better singleton implementation:
    • Add get_instance() static method for returning/creating singleton instance
    • Make static variable 'instance' private
    • Make constructor protected
    • Make class final
    • Additional related changes in plugin framework (protected constructor, erroring __clone() and __wakeup())
  • Add checks to prevent execution of code if file is directly accessed
  • Use explicit path for require_once()
  • Discontinue use of PHP4-style constructor
  • Discontinue use of explicit pass-by-reference for objects
  • Minor documentation improvements
  • Minor code reformatting (spacing, bracing)
  • Note compatibility through WP 3.8+
  • Drop compatibility with version of WP older than 3.6
  • Update copyright date (2014)
  • Regenerate .pot
  • Change donate link
  • Update screenshot
  • Add banner

3.3

  • Fix bug with partial username restriction
  • Add setting page tool for testing multiple usernames for validity
  • Add filter c2c_restrict_usernames-validate to allow adding custom restrictions
  • Add contextual help 'Advanced' tab to explain new filter
  • Add Filters section to readme
  • Use square bracket notation for string character index reference
  • Regenerate .pot
  • Re-license as GPLv2 or later (from X11)
  • Add 'License' and 'License URI' header tags to readme.txt and plugin file
  • Note compatibility through WP 3.5+
  • Update copyright date (2013)
  • Remove ending PHP close tag
  • Create repo's WP.org assets directory
  • Move screenshot into repo's assets directory

3.2

  • Add support for Multisite
  • Update plugin framework to 034
  • Remove support for 'c2c_restrict_usernames' global
  • Note compatibility through WP 3.3+
  • Drop compatibility with versions of WP older than 3.1
  • Change parent constructor invocation
  • Create 'lang' subdirectory and move .pot file into it
  • Regenerate .pot
  • Add 'Domain Path' directive to top of main plugin file
  • Add link to plugin directory page to readme.txt
  • Tweak installation instructions in readme.txt
  • Update screenshots for WP 3.3
  • Update copyright date (2012)

3.1

  • Add support for BuddyPress
  • Add bp_members_validate_user_signup()
  • Fix to properly register activation and uninstall hooks
  • Update plugin framework to 023
  • Save a static version of itself in class variable $instance
  • Deprecate use of global variable $c2c_restrict_usernames to store instance
  • Add __construct(), activation()
  • Note deprecation of 'c2c_restrict_usernames' global
  • Note compatibility through WP 3.2+
  • Drop support for versions of WP older than 3.0
  • Add more FAQ questions
  • Minor code formatting changes (spacing)
  • Fix plugin homepage and author links in description in readme.txt

3.0.1

  • Update plugin framework to version 021
  • Explicitly declare all class functions public
  • Delete plugin options upon uninstallation
  • Note compatibility through WP 3.1+
  • Update copyright date (2011)

3.0

  • Re-implementation by extending C2C_Plugin_016, which among other things adds support for:
    • Reset of options to default values
    • Better sanitization of input values
    • Offload of core/basic functionality to generic plugin framework
    • Additional hooks for various stages/places of plugin operation
    • Easier localization support
  • Full localization support
  • Fix to display custom error message rather than the incorrect WordPress default validation error message
  • Store plugin instance in global variable, $c2c_restrict_usernames, to allow for external manipulation
  • Rename class from 'RestrictUsernames' to 'c2c_RestrictUsernames'
  • Remove docs from top of plugin file (all that and more are in readme.txt)
  • Note compatibility with WP 2.9+, 3.0+
  • Drop compatibility with versions of WP older than 2.8
  • Add PHPDoc documentation
  • Minor tweaks to code formatting (spacing)
  • Add Upgrade Notice section to readme.txt
  • Remove trailing whitespace
  • Update screenshot
  • Update .pot file

2.0.1

  • Fix to add accidentally omitted get_option_names()

2.0

  • Add option to disallow use of spaces in usernames
  • Add option to allow requirement of any of numerous substrings as part of usernames (including start with and end with requirements)
  • Add reset button to reset options
  • Move initialization of config array out of constructor and into new function load_config()
  • Create init() to handle calling load_textdomain() and load_config() (textdomain must be loaded before initializing config)
  • Return immediately if username being check is already invalid
  • Use strpos() instead of stristr()
  • Changed invocation of plugin's install function to action hooked in constructor rather than in global space
  • Extract settings saving code into maybe_save_options()
  • Extract settings display code into display_option()
  • Update object's option buffer after saving changed submitted by user
  • Add support for localization
  • Add .pot file
  • Add PHPDoc documentation
  • Note compatibility with WP 2.9+
  • Drop compatibility with versions of WP older than 2.8
  • Update documentation
  • Update copyright date

1.1

  • Added 'Settings' link to plugin's plugin listing entry
  • Used plugins_url() instead of hardcoded path
  • Noted compatibility with WP2.8+
  • Minor code formatting tweaks

1.0

  • Initial release

Requires: 4.1 or higher
Compatible up to: 4.5.5
Last Updated: 7 months ago
Active Installs: 1,000+

Ratings

3 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1
100,1,1 100,3,3
100,1,1
100,1,1
100,1,1
67,3,2
100,1,1
50,2,1
0,2,0 100,1,1
50,2,1
50,2,1
50,2,1
100,1,1
100,1,1
100,1,1
100,2,2