Skip to content

Commit

Permalink
Merge pull request #616 from ton31337/feature/redis_auth_with_username
Browse files Browse the repository at this point in the history
Add support for username/password authentication for Redis
  • Loading branch information
hi-hai authored Feb 26, 2024
2 parents 24f3217 + 279396c commit 099ee53
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/object-cache.cls.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 099ee53

Please sign in to comment.