Vistor gets "Username contains invalid characters - please use digits, letters or spaces" when adding a period (.) to a username (such as first.last). I see in a few OLD posts that you change the following to include a period: PHP: if (preg_match('/[^0-9a-zA-Z_ ]+/', $vars['login'])){ $error[] = "Username contains invalid characters - please use digits, letters or spaces"; but I can't find this anywhere in 3.0+ versions of amember...so is there some easy place just to change the code...or is this not possible anymore. What's curious is that this used to work, but no longer. Thanks!
There was an overhaul in coding from 2.x to 3.x better to log a ticket to ask Helpdesk about this. Do let us know your findings
What you are looking for is getLoginRegex at the bottom of common.inc.php. Looks like it was changed because of the added ability to turn off or on the inclusion of allowing spaces in usernames in the admin of AMember. Code: '/^[0-9a-zA-Z_]+$/D' : '/^[0-9a-zA-Z_][0-9a-zA-Z_ ]+[0-9a-zA-Z_]$/D'; ..I believe should be changed to Code: '/^[0-9a-zA-Z_.]+$/D' : '/^[0-9a-zA-Z_.][0-9a-zA-Z_ .]+[0-9a-zA-Z_.]$/D'; ...to allow periods. might want to doublecheck that with a support ticket but works, anyway you would then need to change the appropriate language file so it states the inclusion of periods to those signing up if you want.
It is in /amember/application/default/models/User.php Check function getLoginRegex What you need to change here?