Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When i tried to link an existing account to facebook, a new account was created if the existing email adress is different.
Is this normal behavior?
Comment | File | Size | Author |
---|---|---|---|
#9 | fboauth_multiple_accounts.patch | 962 bytes | quicksketch |
Comments
Comment #1
quicksketchYes, that's the normal behavior. If you want to link an existing account, the user must log in first, then use the Connect button on the Edit tab of their account. If #1507336: Ability to populate user registration form fields with user data from Facebook instead of always creating new Drupal account is implemented, perhaps that would solve this problem also, but clearly that would add another step to the registration process instead of it being automatic like it is currently.
Comment #2
chriz001 CreditAttribution: chriz001 commentedSorry, I failed to mention that the user was logged in when the connect button was pressed. If the account they are logged into has a different email address than Facebook, a new account is created and the original still exists. I think the other issue applies only when registering an account right?
Comment #3
quicksketchAh, okay yeah you should be able to link any Facebook account even if the e-mails don't match while you're logged in. I'll have to try this out and see if I can reproduce.
Comment #4
mototribe CreditAttribution: mototribe commentedI had the same problem happen to me today.
Comment #5
mototribe CreditAttribution: mototribe commentedI think this is a bug, at least from a user experience standpoint:
when you are logged into your Drupal profile and connect a Facebook account with a different email address the user wouldn't expect to have a new account created. I had that happen a few times on my site and it's confusing to the user.
If this can't get fixed it suggest to add an additional warning below:
"Connect with Facebook to login with your Facebook account instead of a password." => "Please make sure your Facebook account has the same email address as this account".
cheers
UWE
Comment #6
timofey CreditAttribution: timofey commentedI can confirm the behavior
Comment #7
quicksketchI'm having trouble reproducing this problem. It seems to work fine for me.
So at this point I'm unable to confirm the problem.
In the case that a new account is created, do you receive any error or status messages?
Comment #8
quicksketchOkay after some more experimentation, I think I've found how to reproduce the problem. It looks like new accounts aren't actually created if a user has a different e-mail address, but if the user has two accounts and one of those accounts has the Facebook e-mail, the user will immediately be switched to that account.
To reproduce:
- Create user A with e-mail a@example.com.
- Create user B with e-mail b@example.com.
- Log in as user A.
- Click the "Facebook Connect" button and then log into facebook with b@example.com.
- When you are taken back to the Drupal site, you are now logged in as user B instead of user A.
What should happen is the Facebook account should be linked with user A, even though b@example.com was used to log into Facebook.
Comment #9
quicksketchThis patch corrects the issue where the user may be logged into a different account when their Facebook account associated with the same e-mail address as the second account. Now FBOAuth will delete the existing linking, and relink the current account with the Facebook account.
I've retitled the issue to reflect the actual problem. If it turns out I'm mistaken and new accounts *are* being created, please reopen or file a new issue.