Welcome Guest, Not a member yet? Register   Sign In
Re-loading library?
#1

[eluser]guidorossi[/eluser]
Hi!

I'm trying to make my own auth library with all the things I want and removing the things I don't want or need...

I based my code taking things from some others libraries like ion and wolf...

I'm having some trouble with the "remember me" option...

Basically I've got on my config.php:
Code:
$config['sess_expire_on_close'] = TRUE;

Then on my auth library I load the session library on the controller, but on my log_in() function of the auth library I want to make the "sess_expire_on_close" FALSE if "rememberme" is TRUE:
Code:
if ($remember == TRUE)
{
   $config['sess_expire_on_close'] = FALSE;
   $this->ci->load->library('session', $config);
   $this->remember_me($user->id);
}

but obviously as the session library was loaded in the controller, seems that I can't change the config...

How can I handle this?
have the session expire on close if the user don't want to be remembered and keep it if the user want to be remembered...

Thanks...


Messages In This Thread
Re-loading library? - by El Forum - 04-04-2011, 11:08 PM
Re-loading library? - by El Forum - 04-04-2011, 11:34 PM
Re-loading library? - by El Forum - 04-05-2011, 01:15 PM
Re-loading library? - by El Forum - 04-05-2011, 11:00 PM
Re-loading library? - by El Forum - 04-05-2011, 11:39 PM



Theme © iAndrew 2016 - Forum software by © MyBB