symfony - HWIOAuthBundle eagerly creates users -


in app need able let users log in , connect accounts via oauth. i'm using hwioauthbundle , fosuserbundle accomplish that. there's problem: when i'm registering via facebook or whatnot user entity automatically created , persisted database, , token created user.

what need fetch data provider gives me , map user yet persisted.

if understand, add example facebook information logged-in user.

so have in provider check there connected user , add information:

if (($this->container->get('security.context')->gettoken() instanceof abstracttoken) {     $loggeduser = $this->container->get('security.context')->gettoken()->getuser();     $loggeduser->setfacebookid($fbdata['id']);      /* usermanager fos_user.user_manager service */     $this->usermanager->updateuser($loggeduser);      return $loggeduser; } 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -