Re: Auth module. How to make users always logged
| From: | Adam Ashley | Date: | Fri, 02 Feb 2007 00:16:28 +0000 |
| Subject: | Re: Auth module. How to make users always logged | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-26467@lists.php.net to get a copy of this message | ||
On Thu, 1 Feb 2007 22:17:02 +0100, Paco Brufal <pbrufal@gmail.com> wrote:
Hello, I'm trying to maintain users logged forever, even if the user closes the browser, but I can't do it. I have included this in my source: ini_set("session.gc_maxlifetime",604800); $myauth->setExpire(604800,TRUE); $myauth->setIdle(604800,TRUE); but when I close the browser, I must login again. Somebody can explain me how to do it? Thanks in advance.Auth uses the PHP Session handler which uses a session cookie. A session cookie is never written to a browsers cookie storage and only lasts while the browser is open. I'm looking at adding the ability to enable persistant sessions, it looks to be only a couple of lines of code so it might make it into the next RC for 1.5.0. Adam Ashley