public function createUserFromOAuth($data)
    {
        $user = $this->createUser();
        $user->setAuthDataByProvider($data['provider'], ['id' => $data['id'], 'token' => $data['token']]);
        $user->setAuthProvider($data['provider']);
        $user->setFirstAuthProvider($data['provider']);
        $user->setUsername($data['email']);
        $user->setEmail($data['email']);
        $user->setPassword('none');
        $user->setEnabled(true);
        $user->setContact(new Contact);

        return $user;
    }
public function createUserFromOAuth($data)
    {
        $user = $this->createUser();
        $user->setAuthDataByProvider($data['provider'], ['id' => $data['id'], 'token' => $data['token']]);
        $user->setAuthProvider($data['provider']);
        $user->setFirstAuthProvider($data['provider']);
        $user->setUsername($data['email']);
        $user->setEmail($data['email']);
        $user->setPassword('none');
        $user->setEnabled(true);
        $user->setContact(new Contact);

        return $user;
    }
public function createUserFromOAuth ( $ data ) { $ user = $ this -> createUser ( ) ; $ user -> setAuthDataByProvider ( $ data [ 'provider' ] , [ 'id' => $ data [ 'id' ] , 'token' => $ data [ 'token' ] ] ) ; $ user -> setAuthProvider ( $ data [ 'provider' ] ) ; $ user -> setFirstAuthProvider ( $ data [ 'provider' ] ) ; $ user -> setUsername ( $ data [ 'email' ] ) ; $ user -> setEmail ( $ data [ 'email' ] ) ; $ user -> setPassword ( 'none' ) ; $ user -> setEnabled ( true ) ; $ user -> setContact ( new Contact ) ; return $ user ; }
Creates a new User from oAuth data

@param array $data Normalized oAuth data

@return User
Creates a new User from oAuth data