Persistent cookie exists but not in FUEL (or CI).

edited August 2011 in Modules
I am trying to store a persistent cookie (such as a user name to populate a login field - remember me feature) even after the browser closes. But in using get_cookie() or even $_COOKIE, it does not exist, however, HTTP sniffers (Firefox dev tools and Live HTTP headers) show that it really is there.

Here is my code to set it:

$ckie = array( 'name' => 'mycook', 'value' => 'thisisatest', 'expire' => (3600*24), 'path' => WEB_PATH ); set_cookie($ckie);

Am I missing something obvious?

Thanks in advance.

Comments

  • edited 9:25AM
    What happens if you change the 'path' to just '/' instead?

    Also, as an FYI, the cookie functionality is native to CodeIgniter:
    http://codeigniter.com/user_guide/helpers/cookie_helper.html
  • edited 9:25AM
    That didn't work either (others have had this issue with CI). Maybe I am approaching this the wrong way. All I want to do is to stayed logged in to the CMS (fuelified) after closing the browser. Is there a setting for this?
  • edited 9:25AM
    There currently isn't a setting for that. However, the area to change that in the code is in the fuel/modules/fuel/controllers/login.php file on line 85 or so. However, any change to that native code will probably be overwritten on any updates.
Sign In or Register to comment.