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?

CommentFileSizeAuthor
#9 fboauth_multiple_accounts.patch962 bytesquicksketch
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quicksketch’s picture

a new account was created if the existing email adress is different.

Yes, 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.

chriz001’s picture

Sorry, 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?

quicksketch’s picture

Ah, 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.

mototribe’s picture

I had the same problem happen to me today.

mototribe’s picture

Category: support » bug

I 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

timofey’s picture

I can confirm the behavior

quicksketch’s picture

Status: Active » Postponed (maintainer needs more info)

I'm having trouble reproducing this problem. It seems to work fine for me.

  • Log into my account on the Drupal site normally (my e-mail is [example]@localhost.localhost)
  • Click on the "Facebook Connect" button in the sidebar block (or on the user profile form, I tried both)
  • Grant access to Facebook (my Facebook e-mail is [example]@example.com, so it's a different address than the Drupal site)
  • I'm returned to the front page of the site with "You've connected your account with Facebook." displayed. Checking my account confirms this.

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?

quicksketch’s picture

Okay 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.

quicksketch’s picture

Title: New account created while trying to link existing account » User logged into different account if linking an existing account with a different Facebook e-mail address
Status: Postponed (maintainer needs more info) » Fixed
FileSize
962 bytes

This 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.