I'm working in a project what need link to the account of a registered user and logged their accounts from different social networks (twitter, facebook, google+, etc).

This patch link a twitter account to the user account currently logged in at the time, using the function twitter_signin_button (); to initiate the account registration.

I have added some calls to two hook functions: hook_pre_create_twitter_account and hook_load_twitter_account.

I hope I have done everything correctly, this is my first patch in Drupal xD

Regards

Comments

spesic’s picture

Version: 7.x-3.x-dev » 7.x-3.1
StatusFileSize
new1.02 KB

This feature has not been implemented as of 7.x-3.1. I'm attaching a slightly more elegant solution.

juampynr’s picture

Version: 7.x-3.1 » 7.x-3.x-dev

I think I am missing something. You can accomplish this by using the Sign with Twitter button from the twitter_signin submodule. It follows the next flow:

  1. Log out.
  2. On the login form or the sign in with twitter block, click Sign in with Twitter.
  3. You are taken to Twitter.com. Authenticate with a Twitter account.
  4. You return to the website, if that Twitter account belongs to a user in the Drupal site, you will be automatically logged in. If not, you will be asked to either register or log in. If you Log in, the account will be related with the user.

Could you guys tell me how does the above patch alters/extends this flow?

spesic’s picture

It omits step 1. It allows us to link twitter account with existing Drupal account (if logged in already), instead of creating a new Drupal account all together.

dddave’s picture

Version: 7.x-3.x-dev » 7.x-6.x-dev
damienmckenna’s picture

Issue summary: View changes
Status: Active » Needs review

Lets review the code and see what else can be done.

Status: Needs review » Needs work

The last submitted patch, 1: twitter_signin_connect_logged_in_user-1591596-1.patch, failed testing.