Skip to content

Commit efde844

Browse files
committed
Authentication support added
1 parent 5ed3224 commit efde844

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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)