Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Load existing user and connect to twitter account using twitter account data after authorization #61

Open
vincenzodibiaggio opened this issue Jul 3, 2013 · 0 comments

Comments

@vincenzodibiaggio
Copy link

On your documentation we can see:

namespace MyApp\MyBundle\Security\User\Provider;
class TwitterProvider implements UserProviderInterface
{

[...]

public function findUserByTwitterId($twitterID)
    {   
        return $this->userManager->findUserBy(array('twitterID' => $twitterID));
    }   

    public function loadUserByUsername($username)
    {
        $user = $this->findUserByTwitterId($username);

[...]

To permit association between logged user and authorized user on twitter I have changed code:
[...]

public function findUserByTwitterId($username)
    {   
        return $this->userManager->findUserBy(array('twitter_username' => $username));
    }

[...]
because at this moment in the workflow we manage the twitter_username instead of twitter_id

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant