| 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 | } |
|---|