Welcome Guest, Not a member yet? Register   Sign In
Problem with cookie
#3

[eluser]Cálcio[/eluser]
So, I have a method in my controller, that verify if the cookie exist.
Something like that:

Code:
/**
     * Check if user logged in. Also test if user is activated or not.
     *
     * @param bool
     * @return bool
     */
    function is_logged_in($activated = TRUE) {
        // Try to autologin
if($this->autologin())
{
  return STATUS_ACTIVATED;
}
else
{
  return $this->ci->session->userdata('status') === ($activated ? STATUS_ACTIVATED : STATUS_NOT_ACTIVATED);
}
    }

This verification return true or false.


Messages In This Thread
Problem with cookie - by El Forum - 02-16-2012, 09:33 AM
Problem with cookie - by El Forum - 02-16-2012, 12:40 PM
Problem with cookie - by El Forum - 02-17-2012, 03:51 AM
Problem with cookie - by El Forum - 02-17-2012, 04:14 AM
Problem with cookie - by El Forum - 02-17-2012, 04:38 AM
Problem with cookie - by El Forum - 02-17-2012, 05:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB