Welcome Guest, Not a member yet? Register   Sign In
Ion Auth - Lightweight Auth System based on Redux Auth 2
#54

[eluser]Unknown[/eluser]
Hi Ben,

Lovin' the library. I added it to a clean CI install for testing. In the constructor, if using the 'remember me' feature for auto-login I thought it would be good to test if the user is logged in first, it would save running the DB queries in the login_remembered_user function. Or am I missing something / adding a problem?

Ion_auth.php __construct()
Code:
public function __construct()
    {
        $this->ci =& get_instance();
        $this->ci->load->config('ion_auth');
        $this->ci->load->library('email');
        $this->ci->load->model('ion_auth_model');
        $this->ci->load->helper('cookie');
        
        //auto-login the user if they are remembered
        if (!$this->logged_in() && get_cookie('identity') && get_cookie('remember_code'))
        {
            $this->ci->ion_auth_model->login_remembered_user();
        }
    }

Owen


Messages In This Thread
Ion Auth - Lightweight Auth System based on Redux Auth 2 - by El Forum - 03-10-2010, 03:10 AM



Theme © iAndrew 2016 - Forum software by © MyBB