alzander wrote: It's funny, we just had this request for the first time through email the other day. Until then, we never disliked the fb_12345, but we're going to give admins the option for something 'prettier' in the future (likely around the 3.1.1 release, ~January). If you'd like to make a change now to your preferred method now, you can do the following (and update it if you know a little code). You shouldn't get rid of the Facebook User Id because you can't have 2 users with the same username in Joomla.. so if 2 users were named Joe Smith, and you created "Joe_Smith" for the first.. the 2nd would have issues. However, if you want to update it to "Joe_123456" instead of fb_123456, do the following:
Edit the file below:
/plugins/authentication/jfbconnectauth.php
At line 108 is the following:
$response->username = "fb_".$fbUserId;
You can update this however you want. Directly above it is the full name creation, so you can see how to get the first/last names very easily. For a random 4 digit number, the code is:
So, if you wanted Alex_1234, the code should be:
$response->username = $fbUser."_".$fbUserId;
Or, for first-last_userid, try:
$response->username = $fbUser."-".$fbUser."_".$fbUserId;
Hope this helps, and if you have any other questions, let us know. Again, in a future release, we'll provide a configuration option to more easily set this to a few more readable choices. Any users that are created with whatever system you choose above will be fully compatible with anything we come up with, just so you know.
Good luck, and keep us posted if this works (or doesn't for some reason)!
Join our newsletter to get alerts for Joomla releases, tips and tricks and extension updates.