Welcome Guest, Not a member yet? Register   Sign In
Community auth forced login
#1

Hi all,

I'm having trouble with community auth forced login.

My login system is working fine, but I want the admins to be able to sign in as another user without using the password, for debug purpose.

On this page of the documentation : https://community-auth.com/documentation...rced-login

It says to use
Code:
$auth_model = $this->authentication->auth_model;  
 // Get normal authentication data using email address
 if( $auth_data = $this->{$auth_model}->get_auth_data( $email_address ) )
 {
   /**
    * If redirect param exists, user redirected there.
    * This is entirely optional, and can be removed if
    * no redirect is desired.
    */
   $this->authentication->redirect_after_login();  
   // Set auth related session / cookies
   $this->authentication->maintain_state( $auth_data );
 }

When I do that (method in a controller), I'm succefully logged as the user I chose, but as soon as I refresh or go to another page, I'm sent back to the login screen.

Anyone can help ?
Reply


Messages In This Thread
Community auth forced login - by mxfragz - 05-28-2017, 09:16 PM
RE: Community auth forced login - by skunkbad - 05-29-2017, 08:36 AM
RE: Community auth forced login - by mxfragz - 05-30-2017, 06:19 PM
RE: Community auth forced login - by mxfragz - 05-30-2017, 07:18 PM
RE: Community auth forced login - by skunkbad - 05-30-2017, 10:15 PM
RE: Community auth forced login - by mxfragz - 05-31-2017, 12:11 AM
RE: Community auth forced login - by skunkbad - 05-31-2017, 12:16 PM
RE: Community auth forced login - by mxfragz - 05-31-2017, 06:40 PM
RE: Community auth forced login - by skunkbad - 05-31-2017, 07:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB