Development

Changeset 5706

You must first sign up to be able to contribute.

Changeset 5706

Show
Ignore:
Timestamp:
10/26/07 21:48:40 (2 years ago)
Author:
pookey
Message:

now only logged in user sessions are timed out

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/user/sfBasicSecurityUser.class.php

    r5159 r5706  
    234234      $this->credentials   = array(); 
    235235    } 
    236  
    237     // Automatic logout if no request for more than [sf_timeout] 
    238     if (null !== $this->lastRequest && (time() - $this->lastRequest) > sfConfig::get('sf_timeout')) 
    239     { 
    240       if (sfConfig::get('sf_logging_enabled')) 
    241       { 
    242         $this->dispatcher->notify(new sfEvent($this, 'application.log', array('Automatic user logout'))); 
    243       } 
    244  
    245       $this->setTimedOut(); 
    246       $this->setAuthenticated(false); 
     236    else 
     237    { 
     238      // Automatic logout logged in user if no request within [sf_timeout] setting 
     239      if (null !== $this->lastRequest && (time() - $this->lastRequest) > sfConfig::get('sf_timeout')) 
     240      { 
     241        if (sfConfig::get('sf_logging_enabled')) 
     242        { 
     243          $this->dispatcher->notify(new sfEvent($this, 'application.log', array('Automatic user logout due to timeout'))); 
     244        } 
     245 
     246        $this->setTimedOut(); 
     247        $this->setAuthenticated(false); 
     248      } 
    247249    } 
    248250 

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting, and supporting several large Open-Source projects.