[ic] UserDB.pm v2.52 - emails with numbers

Josh Lavin josh at myprivacy.ca
Sun May 13 18:40:22 EDT 2007


I use the username_email feature of UserDB to allow email addresses  
to be used as usernames. We recently noticed a customer who could not  
create an account, because her email started with a numeral. She  
received this error, from UserDB.pm (line 1616):

"Sorry, user name must be an email address."

We had version 2.51 of this file, and it seems this was fixed in v.2.52:

die errmsg("Sorry, user name must be an email address.") . "\n"
    if $self->{OPTIONS}{username_email}
-    and $self->{USERNAME} !~ m!^[a-zA-Z]([.]?([[:alnum:]._-]+)*)?@ 
([[:alnum:]\-_]+\.)+[a-zA-Z]{2,4}$!;
+    and $self->{USERNAME} !~ m!^[:alnum:]([.]?([[:alnum:]._-]+)*)?@ 
([[:alnum:]\-_]+\.)+[a-zA-Z]{2,4}$!;

However, this does not seem to work. Now, when someone tries to  
create an account with any email address, such as josh at hotmail.com,  
it returns the error above. I had to go back to 2.51 to get any new  
accounts to work at all.

Any ideas on how to fix this?

Thanks,
--
Josh
Kingdom Design   http://www.kingdomdesign.com/




More information about the interchange-users mailing list