How to set the session timeout in Zend Framework 2

Posted by user2261761 on Stack Overflow See other posts from Stack Overflow or by user2261761
Published on 2014-08-18T15:59:16Z Indexed on 2014/08/19 10:20 UTC
Read the original article Hit count: 172

I don't have much Zend experience and want to change someone's login code in Zend to make the session not expire.

It seems the code is basic behavior:

    $adapter = $this->getAuthService()->getAdapter();
    $adapter->setIdentity($email)->setCredential($password);

    $result = $this->getAuthService()->authenticate();

What do I have to do to make the session not expire or to at least set the session for a specific time?

Right now the user doesn't stay logged in for long, I think perhaps it is just relying on default php settings behavior like the standard 24 minutes for the gc_maxlifetime.

What is the connection between Zend_Session and AuthService?

© Stack Overflow or respective owner

Related posts about php

Related posts about zend-framework