From 06653ab9599ed3b2fcc267db04b37bfcd056b567 Mon Sep 17 00:00:00 2001 From: Jonathan Mifsud Date: Tue, 1 Oct 2019 13:31:05 +0200 Subject: [PATCH] cater for when one purposefully wants to change login users by not using hash in memory --- lib/member.symphony.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/member.symphony.php b/lib/member.symphony.php index 916e17a..41c48b5 100644 --- a/lib/member.symphony.php +++ b/lib/member.symphony.php @@ -245,7 +245,8 @@ public function login(array $credentials, $isHashed = false) { $this->cookie->set('email', $data['email']); } - $this->cookie->set('password', $this->getMember()->getData($this->section->getField('authentication')->get('id'), true)->password); + $hashedPassword = $isHashed ? $data['password'] : $this->getMember()->getData($this->section->getField('authentication')->get('id'), true)->password; + $this->cookie->set('password', $hashedPassword ); self::$isLoggedIn = true;