I done a facebook login to my application,which helps the register user can login their account by using their facebook.
I was planning to redirect the loged user to their my account page instead of getting back to Index page.How can I achieve this.
My controller
public function successCallback($client)
{
$attributes = $client->getUserAttributes();
// user login or signup comes here
// print_r($attributes['email']);die();
$user_email = $attributes['email'];
$user = User::find()->where(['user_email'=>$user_email])->one();
$count = count($user);
if($count == 0){
return $this->redirect['user/register']
} else{
//auto login function
}
How can I achieve auto login??
Please help me..


View Solution