Frank Vèssia Posted October 13, 2018 Share Posted October 13, 2018 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 More sharing options...
adrian Posted October 13, 2018 Share Posted October 13, 2018 https://processwire.com/api/ref/session/force-login/ 5 Link to comment Share on other sites More sharing options...
Frank Vèssia Posted October 13, 2018 Author Share Posted October 13, 2018 ouch, this one I missed, thanks Adrian 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now