Welcome Guest, Not a member yet? Register   Sign In
Need some guidance cookies
#2

(This post was last modified: 07-22-2016, 04:24 AM by InsiteFX. Edit Reason: Added example php code )

If the remember me token passes and you get the users login data just set the session logged_in = true

You have logged the user in so that should be all you need to do.

In your Auth Library:

PHP Code:
    /**
     * logged_in ()
     * --------------------------------------------------------------------
     *
     * Check to see if a user is logged in
     *
     * Look in the session and return the 'logged_in' part
     *
     * @return  bool
     */
    
public function logged_in()
    {
        return (
$this->_ci->session->userdata('logged_in') == true) ? true false;
    } 
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
Need some guidance cookies - by wolfgang1983 - 07-22-2016, 03:03 AM
RE: Need some guidance cookies - by InsiteFX - 07-22-2016, 04:20 AM
RE: Need some guidance cookies - by wolfgang1983 - 07-22-2016, 04:28 AM



Theme © iAndrew 2016 - Forum software by © MyBB