I am getting this error:
Fatal error: Cannot redeclare class apiException in E:\Applications\xampp\htdocs\onlineshop\application\third_party\google-login-api\apiClient.php on line 367
What does it mean?
What should I do to fix it? Add exception in my controller or anything else?
Please help me.
Here's my code
public function gplus_login(){
if(isset($_GET['code'])){
$this->googleplus->getAuthenticate();
$user_profile2 = $this->googleplus->getUserInfo();
$username2 = $user_profile2['email'];
$password2 = $user_profile2['email'];
$member_status2 = 1;
$result2 = $this->m_member->check_login($username2, $password2, $member_status2);
if($result2 == TRUE){
$user2 = $this->m_member->by_id(array('member_username'=>$username2));
$newdata2 = (array(
'username_front' => $username2,
'member_id' => $user2->member_id,
'member_fullname' => $user2->member_fullname,
'logged_in_front' => TRUE
));
$this->session->set_userdata($newdata2);
redirect('home');
}
else{
$data2 = array(
'member_gplus_id' => $user_profile2["id"],
'member_fullname' => $user_profile2["name"],
'member_email' => $user_profile2["email"],
'member_username' => $user_profile2["email"],
'member_password' => md5($user_profile2["email"]),
'member_status' => 1,
'member_isreseller' => 0,
'member_login' => 0,
'created_by' => $user_profile2["name"],
'created_on' => date('Y-m-d H:i:s'));
$this->m_member->insert($data2);
$user3 = $this->m_member->by_id(array('member_username'=>$username2));
$newdata3 = (array(
'username_front' => $username2,
'member_id' => $user3->member_id,
'member_fullname' => $user3->member_fullname,
'logged_in_front' => TRUE
));
$this->session->set_userdata($newdata3);
redirect("account");
}
}
else{
$this->session->set_flashdata("Login Error");
redirect("home");
}
}