2009年10月16日星期五

Re: [fw-auth] Zend_Session::rememberMe() not working or not implemented correctly.

Use the following to handle the "remember me" functionality:

            if ($this->_hasParam('rememberme') && $this->_getParam('rememberme')) {
               
            /**
                  * 'remeberMe' setting is defined it the global config
                  */
                Zend_Session::rememberMe();
               
            $saveHandler = Zend_Session::getSaveHandler();
            $saveHandler->setLifetime($this->_globalConfig->session->params->remember_me_seconds)
                        ->setOverrideLifetime(true);
               
            }

On Fri, Oct 16, 2009 at 9:36 AM, bmuse <brian.muse@gmail.com> wrote:

I'm trying to keep my users logged in for a month. Currently I'm calling
Zend_Session::start();
in my bootstrap.

In my login controller I have:
Zend_Session::rememberMe(60*60*24*7*4);

However, I'm only logged in in the current tab or window and the session
seems to expire after an hour or so.

Any advice on the proper way to set this up would be greatly appreciated.
--
View this message in context: http://www.nabble.com/Zend_Session%3A%3ArememberMe%28%29-not-working-or-not-implemented-correctly.-tp25926465p25926465.html
Sent from the Zend Auth mailing list archive at Nabble.com.




--
Cory Wiles
kwylez@gmail.com
http://www.corywiles.com/
http://www.randomthoughtprocess.com/

没有评论: