protected function createMember(AccessToken $token, AbstractProvider $provider)
    {
        $session = $this->getSession();
        $providerName = $session->get('oauth2.provider');
        $user = $provider->getResourceOwner($token);

        /** @var Member|MemberExtension $member */
        $member = Member::create();
        $member = $this->getMapper($providerName)->map($member, $user);
        $member->OAuthSource = $providerName;
        $member->write();

        return $member;
    }
protected function createMember(AccessToken $token, AbstractProvider $provider)
    {
        $session = $this->getSession();
        $providerName = $session->get('oauth2.provider');
        $user = $provider->getResourceOwner($token);

        /** @var Member|MemberExtension $member */
        $member = Member::create();
        $member = $this->getMapper($providerName)->map($member, $user);
        $member->OAuthSource = $providerName;
        $member->write();

        return $member;
    }
protected function createMember ( AccessToken $ token , AbstractProvider $ provider ) { $ session = $ this -> getSession ( ) ; $ providerName = $ session -> get ( 'oauth2.provider' ) ; $ user = $ provider -> getResourceOwner ( $ token ) ; /** @var Member|MemberExtension $member */ $ member = Member :: create ( ) ; $ member = $ this -> getMapper ( $ providerName ) -> map ( $ member , $ user ) ; $ member -> OAuthSource = $ providerName ; $ member -> write ( ) ; return $ member ; }
Create a member from the given token

@param AccessToken $token
@param AbstractProvider $provider
@return Member
@throws ValidationException
Create a member from the given token