| 227 | | |
|---|
| 228 | | // Automatic logout if no request for more than [sf_timeout] |
|---|
| 229 | | if (null !== $this->lastRequest && (time() - $this->lastRequest) > sfConfig::get('sf_timeout')) |
|---|
| 230 | | { |
|---|
| 231 | | if (sfConfig::get('sf_logging_enabled')) |
|---|
| 232 | | { |
|---|
| 233 | | $this->getContext()->getLogger()->info('{sfUser} automatic user logout'); |
|---|
| 234 | | } |
|---|
| 235 | | $this->setTimedOut(); |
|---|
| 236 | | $this->setAuthenticated(false); |
|---|
| | 227 | else |
|---|
| | 228 | { |
|---|
| | 229 | // Automatic logout logged in user if no request within [sf_timeout] setting |
|---|
| | 230 | if (null !== $this->lastRequest && (time() - $this->lastRequest) > sfConfig::get('sf_timeout')) |
|---|
| | 231 | { |
|---|
| | 232 | if (sfConfig::get('sf_logging_enabled')) |
|---|
| | 233 | { |
|---|
| | 234 | $this->getContext()->getLogger()->info('{sfUser} automatic user logout due to timeout'); |
|---|
| | 235 | } |
|---|
| | 236 | $this->setTimedOut(); |
|---|
| | 237 | $this->setAuthenticated(false); |
|---|
| | 238 | } |
|---|