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