Check if session is valid and is not expired. If no valid session, check cookie keepSession.
/** * @return Scalr_Session */ public static function getInstance() { if (self::$_session === null) { self::$_session = new Scalr_Session(); self::$_session->hashpwd = Scalr_Util_CryptoTool::hash(@file_get_contents(dirname(__FILE__) . "/../etc/.cryptokey")); } if (!self::$_session->restored) { self::$_session->restored = true; Scalr_Session::restore(); } return self::$_session; }