An error comes in the code while using HybridAuth as extension in yii framework-"undefined variable-user_profile"

74 views Asked by At

I used HybridAuth extension for the purpose of signing in as facebook. The code which is causing error in Hybrid Auth is as follows:

try
{
            $path1 = Yii::getPathOfAlias('ext.HybridAuth');
            require_once ($path1 . '/hybridauth-' . HybridAuthIdentity::VERSION . '/hybridauth/Hybrid/Auth.php');
            $config   =  $path1 . '/hybridauth-' . HybridAuthIdentity::VERSION . '/hybridauth/config.php';

            // initialize Hybrid_Auth with a given file

            $hybridauth = new Hybrid_Auth( $config );

            // try to authenticate with the selected provider
            $adapter = $hybridauth->authenticate( $provider_name );

            // then grab the user profile

            $user_profile = $adapter->getUserProfile();
}
catch(Exception $e)
{
}
0

There are 0 answers