Welcome Guest, Not a member yet? Register   Sign In
Login Question Codeigniter with Google API
#3

(05-26-2017, 01:27 AM)rtenny Wrote:
(05-25-2017, 11:23 PM)wolfgang1983 Wrote: When a user logins with my google api function and is success full it adds # to the redirected controller url

I don't know how its adding the # hashtag to the redirect url I use vhost


PHP Code:
http://domain.com/usercp# 


Question is there away to stop the hashtag from showing up when user is redirect to there usercp?



PHP Code:
public function google() {
 
   $googleplus_auth $this->googleplus->getAuthenticate();
    
 
   $googleplus_info $this->googleplus->getUserInfo();

 
   $google_data = array(
    
'google_id' => $googleplus_info['id'],
    
'google_name' => $googleplus_info['name'],
    
'google_link' => $googleplus_info['link'],
    
'image' => $googleplus_info['picture'],
    
'email' => $googleplus_info['email'],
    
'firstname' => $googleplus_info['given_name'],
    
'lastname' => $googleplus_info['family_name']
 
   );

 
   $login_google_userid $this->login_model->login_with_google($googleplus_info['id'], $google_data);

 
   $_SESSION['user_id'] = $login_google_userid;

 
   redirect('usercp');




I use this google api from here https://github.com/moemoe89/google-login-ci3

I always have a trailing / in the redirect- Not sure, but see that that helps your issue

PHP Code:
redirect('usercp/'); 

Just adds # hashtag after /#

Now very strange not sure why adds hashtag when redirect to usercp
There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!
Reply


Messages In This Thread
RE: Login Question Codeigniter with Google API - by wolfgang1983 - 05-26-2017, 01:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB