From d4b15bcdbd6a06e01d8de927c1d26f8f5bc4ed6c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 22 Feb 2022 12:16:26 +0200 Subject: [ci skip] SessionUpdateTimestampHandlerInterface --- .../Session/drivers/Session_redis_driver.php | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'system/libraries/Session/drivers/Session_redis_driver.php') diff --git a/system/libraries/Session/drivers/Session_redis_driver.php b/system/libraries/Session/drivers/Session_redis_driver.php index b112a18c8..269dfcd64 100644 --- a/system/libraries/Session/drivers/Session_redis_driver.php +++ b/system/libraries/Session/drivers/Session_redis_driver.php @@ -355,16 +355,32 @@ class CI_Session_redis_driver extends CI_Session_driver implements CI_Session_dr // -------------------------------------------------------------------- + /** + * Update Timestamp + * + * Update session timestamp without modifying data + * + * @param string $id Session ID + * @param string $data Unknown & unused + * @return bool + */ + public function updateTimestamp($id, $unknown) + { + return $this->_redis->{$this->_setTimeout_name}($this->_key_prefix.$id, $this->_config['expiration']); + } + + // -------------------------------------------------------------------- + /** * Validate ID * * Checks whether a session ID record exists server-side, * to enforce session.use_strict_mode. * - * @param string $id + * @param string $id Session ID * @return bool */ - public function validateSessionId($id) + public function validateId($id) { return (bool) $this->_redis->exists($this->_key_prefix.$id); } -- cgit v1.2.3-24-g4f1b