Welcome Guest, Not a member yet? Register   Sign In
IonAuth: how to remove not needed session cookie?
#1

Hello everyone,

I am trying to add IonAuth to my site. I successfully load the library into the page using autoload.php. Now, however, the session cookie is set with each call. 
Since I try not to set any cookies, this is somewhat counterproductive.

In the __construct() area of my classes I added the following code to delete the cookie if the user is not logged in at all:
PHP Code:
public function __construct() {

        
// ...

 
       // Session Cleaner
 
       if (!$this->ion_auth->logged_in()) {
 
           $this->session->sess_destroy();
 
       }



However, this is not such a nice solution, because I have to do it over and over again with every new class.

My question: Can I prevent IonAuth from setting a session cookie if the user is not logged in?

Greetings
Kel
Reply


Messages In This Thread
IonAuth: how to remove not needed session cookie? - by Kel - 08-01-2018, 03:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB