David,
With that 'generic' of a username, you're going to get a lot of duplicates, which means there will be a lot of John.D, John.D123, John.D124, etc. Shouldn't cause any issues, just means there will be numbers.
To change it, edit the /libraries/sourcecoast/utilities.php file. Around line 470, you'll see:
else if ($email != '') //email
{
$prefix = $email;
}
if($prefix != '')
{
$suffix = SCUserUtilities::getUsernameUniqueNumber($prefix);
return $prefix . $suffix;
}Add the following block in there, so it looks like:
else if ($email != '') //email
{
$prefix = $email;
}
// ADD THIS BLOCK
$firstName = SCStringUtilities::strtolower($firstName);
$lastName = SCStringUtilities::strtolower($lastName);
$lastPrefix = SCStringUtilities::substr($lastName, 0, 1);
$prefix = $firstName . $lastPrefix;
// END NEW BLOCK
if($prefix != '')
{
$suffix = SCUserUtilities::getUsernameUniqueNumber($prefix);
return $prefix . $suffix;
}That's completely untested, so you (should) know the drill. Test, test, and test some more.. and let us know how it goes!
That change will need to be made any time you update JFBConnect. We may look into adding that as an option, but it won't be in the next release or anytime I can commit too.
Good luck,
Alex