Elcodi\Store\ConnectBundle\Services\OAuthUserProvider::findOrCreateUser PHP Method

findOrCreateUser() protected method

Find or creates a user related to a given response of the resource owner
protected findOrCreateUser ( HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface $response ) : Symfony\Component\Security\Core\User\UserInterface
$response HWI\Bundle\OAuthBundle\OAuth\Response\UserResponseInterface Response of the resource owner
return Symfony\Component\Security\Core\User\UserInterface
    protected function findOrCreateUser(UserResponseInterface $response)
    {
        $user = $this->findUser($response);
        if ($user instanceof UserInterface) {
            return $user;
        }
        return $this->createUser($response);
    }