public function getLifeTime()
{
if (is_null($this->_lifeTime)) {
$configNode = Mage::app()->getStore()->isAdmin() ? 'admin/security/session_cookie_lifetime' : 'web/cookie/cookie_lifetime';
$this->_lifeTime = (int) Mage::getStoreConfig($configNode);
if ($this->_lifeTime < 60) {
$this->_lifeTime = ini_get('session.gc_maxlifetime');
}
if ($this->_lifeTime < 60) {
$this->_lifeTime = 3600;
//one hour
}
if ($this->_lifeTime > self::SEESION_MAX_COOKIE_LIFETIME) {
$this->_lifeTime = self::SEESION_MAX_COOKIE_LIFETIME;
// 100 years
}
}
return $this->_lifeTime;
}