Plugin Directory

Changeset 552750


Ignore:
Timestamp:
06/04/2012 06:19:59 AM (14 years ago)
Author:
dwc
Message:

Add support for periods in usernames

Location:
network-username-restrictions-override/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • network-username-restrictions-override/trunk/network-username-restrictions-override.php

    r552749 r552750  
    1010
    1111class NetworkUsernameRestrictionsOverridePlugin {
    12     var $db_version = 1;
     12    var $db_version = 2;
    1313    var $option_name = 'network_username_restrictions_override_options';
    1414    var $options;
     
    1717        'allow_numeric' => false,
    1818        'allow_hyphens' => false,
     19        'allow_periods' => false,
    1920        'allow_underscores' => false,
    2021        'allow_uppercase' => false,
     
    7576                            if ($this->options['allow_hyphens']) $allowed_characters .= '-';
    7677                            if ($this->options['allow_underscores']) $allowed_characters .= '_';
     78                            if ($this->options['allow_periods']) $allowed_characters .= '.';
    7779                            if ($this->options['allow_uppercase']) $allowed_characters .= 'A-Z';
    7880
     
    197199                    <label><input type="checkbox" id="allow_hyphens" name="network_username_restrictions_override_options[allow_hyphens]" value="1"<?php if ($this->options['allow_hyphens']): ?> checked="checked"<?php endif; ?> /> Allow hyphens</label><br />
    198200                    <label><input type="checkbox" id="allow_underscores" name="network_username_restrictions_override_options[allow_underscores]" value="1"<?php if ($this->options['allow_underscores']): ?> checked="checked"<?php endif; ?> /> Allow underscores</label><br />
     201                    <label><input type="checkbox" id="allow_periods" name="network_username_restrictions_override_options[allow_periods]" value="1"<?php if ($this->options['allow_periods']): ?> checked="checked"<?php endif; ?> /> Allow periods</label><br />
    199202                    <label><input type="checkbox" id="allow_uppercase" name="network_username_restrictions_override_options[allow_uppercase]" value="1"<?php if ($this->options['allow_uppercase']): ?> checked="checked"<?php endif; ?> /> Allow uppercase letters</label><br />
    200203                    Note: WordPress converts usernames to lowercase. This option simply makes data entry easier.
     
    220223            'allow_hyphens',
    221224            'allow_underscores',
     225            'allow_periods',
    222226            'allow_uppercase',
    223227        );
  • network-username-restrictions-override/trunk/readme.txt

    r552749 r552750  
    3838Unfortunately, the WordPress code for adding users forces usernames to lowercase without offering an option to configure it via a plugin.
    3939
     40= I have site URLs based on the username. Why don't some of them load? =
     41
     42You'll have to update the regular expressions in your `.htaccess` file if you use email addresses or periods in usernames. These are not provided by default, and this plugin will not edit your `.htaccess` file automatically due to the rick involved.
     43
    4044== Screenshots ==
    4145
     
    4751* Remove use of call-time pass by reference to avoid warnings on PHP 5.3 and newer
    4852* Secondary username length check no longer causes an error when adding a username longer than the configured minimum
     53* Add support for periods in usernames
    4954
    5055= 1.1 =
Note: See TracChangeset for help on using the changeset viewer.