From 1ffadaec07f9179b4db10c27175ec82f215c6aa1 Mon Sep 17 00:00:00 2001 From: Frank Giesecke Date: Thu, 1 Feb 2018 10:48:49 +0100 Subject: [PATCH] Authentication support added --- pkg/redis/PhpRedis.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkg/redis/PhpRedis.php b/pkg/redis/PhpRedis.php index 71ead40d4..c05bf9e12 100644 --- a/pkg/redis/PhpRedis.php +++ b/pkg/redis/PhpRedis.php @@ -82,6 +82,14 @@ public function connect() ); } + if (array_key_exists('pass', $this->config)) { + $this->config['auth'] = $this->config['pass']; + } + + if (array_key_exists('auth', $this->config)) { + $this->redis->auth($this->config['auth']); + } + $this->redis->select($this->config['database']); }