View Single Post
  #2 (permalink)  
Old 04-20-2007, 07:24 PM
Jared Jared is offline
Junior Member
 
Join Date: Mar 2007
Posts: 1
Default

This assumes that you aren't changing the default Zend_Auth namespace. If you are then update my code below to reflect your defined namespace.

PHP Code:

$authSession 
= new Zend_Session_Namespace('Zend_Auth');
$authSession->setExpirationSeconds(3600); 
You will want to insert that into your authenticateAction() function right after the user is determined to be valid. Below is your code showing you where the snippet above should be roughly.

PHP Code:

if (!$result->isValid()) {
  
// Authentication failed; print the reasons why
  
foreach ($result->getMessages() as $message) {
    echo 
"$message\n. Click <a href='".$this->view->baseUrl."/'>here</a> to try again";
  }
} else {
  
$authSession = new Zend_Session_Namespace('Zend_Auth');
  
$authSession->setExpirationSeconds(3600);
  
$dbAdapter Zend_Registry::get('dbAdapter');

... 
Reply With Quote