Jump to content

login user without password


Frank Vèssia
 Share

Recommended Posts

Hello guys I've been searching for a way to login users without password (after they login with facebook button), I've found some api functions that seem to be working but I still have some issue.
What I do is:

$checkUser = $users->get("login_facebook_id=$uid");
if($checkUser->id){
         $users->setCurrentUser($checkUser);
         $user = $users->getCurrentUser();
         $session->_user_id = $user->id;
         $session->redirect("/",false);
 }

 


The code looks working because after setting the session the current $user->id returns the user I found, but after the redirect $user id back to guest (40)...any idea why ? Thanks

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...