Our site www.viart.com site is operated by latest Viart Shop 5 with default Clear design
Topic Information
dmaislin
dmaislin
Currently I get the error:
 
Only alpha-numeric characters, hyphen and underscore are allowed for field Login Information: Username
 
Also, which files would I modify to allow a customer to enter at most a 64bit length.
 
Further, what SQL should I run on the va_users in the database to allow for longer usernames?
 
Thanks,
 
David
 
Anjula
Anjula
Hello,
 
Thanks for your questions.
 
Where do I set the preference to allow users to use their email address when they register?
 
You can select an option to use email addresses in the login field via Administration > Site Users > User Types > Profile Settings > Predefined Fields tab > Login Details section. Ensure you enable the option 'Contact Email Address'.
 
Currently I get the error:
Only alpha-numeric characters, hyphen and underscore are allowed for field Login Information: Username
 
You're getting this error as you use some unsupported symbols in this field.
If you want to allow users to use any symbols in user login field you have to update regular expression constant ALPHANUMERIC_REGEXP
in the 'includes/constants.php' with some expression like
define("ALPHANUMERIC_REGEXP", "/^[\w\d\\-\\.]+\$/i");
if you just need to allow space you may use following code
define("ALPHANUMERIC_REGEXP", "/^[_a-z0-9\\-\\.\s]+\$/i");
but we recommend to use original regular expression to exclude possible problems with some language specific symbols and additional spaces in the login field.
 
What SQL should I run on the va_users in the database to allow for longer usernames?
 
Please, use the following SQL query to increase the length of the login field:
ALTER TABLE va_users MODIFY COLUMN login VARCHAR(255)
 
With kind regards,
ViArt Support Team