[support] getting the underscore to be unusable in user names

Neil: esl-lounge.com neil at esl-lounge.com
Wed Aug 1 15:40:45 UTC 2007


I found a post on drupal.org that said you could do all of this via Access 
Rules.

http://drupal.org/node/29694

So I went there and entered the following three rules to outlaw underscores

_% - deny/username
%_ - deny/username
%_% - deny/username

.....and found myself and every other username blocked from the site, unable 
to log in without getting a "this username has been reserved" error message. 
Totally frozen out of the site, I had to go into phpmyadmin and get rid of 
those three entries from the "access" table. Have I ignored something 
glaringly obvious with those deny rules?


----- Original Message ----- 
From: "Earl Miles" <merlin at logrus.com>
To: <support at drupal.org>
Sent: Wednesday, August 01, 2007 5:12 PM
Subject: Re: [support] getting the underscore to be unusable in user names


> Neil: esl-lounge.com wrote:
>> I have run into trouble with the underscore. (concerning a mesh up
>> between drupal and mediawiki)
>>
>> I would like to find a way of getting the underscore on the "banned
>> list" for drupal registrations. If I try and register a name such as
>> "great!!!", I get a message saying:
>>
>> "punctuation is not allowed except for periods, hyphens and underscores"
>>
>> I would like to make it impossible for underscores. Is this just a case
>> of altering something in user.module?
>>
>> many thanks in advance
>>
>> Neil
>>
>
> Look up hook_user on api.drupal.org
>
> Write a small module that implements the 'validate' operation.
>
> That way you can make your validation and not have to hack the code.
> -- 
> [ Drupal support list | http://lists.drupal.org/ ]
> 



More information about the support mailing list