Zend_Session::rememberMe() not working or not implemented correctly.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Zend_Session::rememberMe() not working or not implemented correctly.

bmuse
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.
Reply | Threaded
Open this post in threaded view
|

Re: Zend_Session::rememberMe() not working or not implemented correctly.

kwylez
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 <[hidden email]> 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
[hidden email]
http://www.corywiles.com/
http://www.randomthoughtprocess.com/