From 279396cf31249a98bfd79e0e169faaab7134a9a4 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Mon, 12 Feb 2024 15:13:17 +0200 Subject: [PATCH] Add support for username/password authentication for Redis Hello from Hostinger \m/ Since Redis ACLs support, it's possible to authenticate using username + password. Let's add this missing stuff. Signed-off-by: Donatas Abraitis --- src/object-cache.cls.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/object-cache.cls.php b/src/object-cache.cls.php index 3c457e0ef..502f4391d 100644 --- a/src/object-cache.cls.php +++ b/src/object-cache.cls.php @@ -293,7 +293,10 @@ private function _connect() } if ($this->_cfg_pswd) { - $this->_conn->auth($this->_cfg_pswd); + if ($this->_cfg_user) + $this->_conn->auth([$this->_cfg_user, $this->_cfg_pswd]); + else + $this->_conn->auth($this->_cfg_pswd); } if ($this->_cfg_db) {