× Joomla Facebook Connect support forum

Topic-icon What is proper "link account" behavior?

11 years 3 months ago #29127 by chramb1
Presume someone signs in using Facebook and no mapping is found. They get the view for loginregister which lets them either register or associate their account.

Let's say they choose to associate their account and then give a correct username and password. Will this automatically import their email from Facebook and replace it in Joomla? Because if not, that means that the Facebook email and account email will be out of sync, which isn't a great idea. My fear is that the code just creates an associated mapping but does not overwrite the email address.

This is especially concerning because all of my sites override all login features to not use username/password but, instead, use email/password. So if a user comes along and logs in with facebook, I actually only want their login associated if the emails match. Can this be done?

In other words, when a user logs in and there is no mapping, automatically map it if the user is authenticated with FB *and* there is an account, already active, with the email that FB provides...
The topic has been locked.
Support Specialist
11 years 3 months ago #29142 by alzander
Christopher,
For the association to an existing user account, no, we don't update the Joomla user's email address when they do so. Since the user already has an account on your site, we assume that the email they provided is what they want. If we start overwriting user data for already existing accounts (like Name), that could upset users.

However, we do have a "Automatically connect user's by email" setting. You can enable that setting to force FB users to link to their already existing account. There's a few lines of code that I know could be added to prevent new registrations through Facebook altogether (we've done this for other users). Then, with the setting above, that would only match the users up like you're looking for.

Let me know if that sounds right to you.

Thanks,
Alex
The topic has been locked.