From 026a6e9825a243b49e121db0b3efe57e230fbc51 Mon Sep 17 00:00:00 2001 From: Antonio Ramirez Date: Sun, 6 Aug 2017 15:28:05 +0200 Subject: [PATCH] updateAttributes fails! fix methodology --- src/User/Service/ResetPasswordService.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/User/Service/ResetPasswordService.php b/src/User/Service/ResetPasswordService.php index a54d70d..603ef19 100644 --- a/src/User/Service/ResetPasswordService.php +++ b/src/User/Service/ResetPasswordService.php @@ -23,17 +23,14 @@ class ResetPasswordService implements ServiceInterface public function __construct($password, User $model, SecurityHelper $securityHelper) { - $this->password; + $this->password = $password; $this->model = $model; $this->securityHelper = $securityHelper; } public function run() { - return $this->model && (bool)$this->model->updateAttributes( - [ - 'password_hash' => $this->securityHelper->generatePasswordHash($this->password), - ] - ); + $this->model->password = $this->password; + return (bool)$this->model->save(false, ['password_hash']); } }