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
#2

check this:  https://www.codeigniter.com/user_guide/l...sions-work
Reply
#3

While you may find someone here that can answer your question, you might be better served to ask the developer himself...

https://github.com/benedmunds/CodeIgnite...uth/issues
Reply




Theme © iAndrew 2016 - Forum software by © MyBB