Skip to content

Commit 1ffadae

Browse files
committed
Authentication support added
1 parent 6b5b7cd commit 1ffadae

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎pkg/redis/PhpRedis.php‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,14 @@ public function connect()
8282
);
8383
}
8484

85+
if (array_key_exists('pass', $this->config)) {
86+
$this->config['auth'] = $this->config['pass'];
87+
}
88+
89+
if (array_key_exists('auth', $this->config)) {
90+
$this->redis->auth($this->config['auth']);
91+
}
92+
8593
$this->redis->select($this->config['database']);
8694
}
8795

0 commit comments

Comments
 (0)