From 389de2aa84740600efb9a8392a005f86efb09c73 Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Thu, 19 Jul 2018 10:33:28 +0800 Subject: [PATCH] Refactor --- app/Models/User.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Models/User.php b/app/Models/User.php index bef46570..a0c6a0cd 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -141,17 +141,17 @@ class User extends Model /** * Change password of the user. * - * @param string $new_passwd New password that will be set. + * @param string $password New password that will be set. * @return bool */ - public function changePassword($new_passwd) + public function changePassword($password) { - $responses = event(new EncryptUserPassword($new_passwd, $this)); + $responses = event(new EncryptUserPassword($password, $this)); if (isset($responses[0])) { $this->password = $responses[0]; // @codeCoverageIgnore } else { - $this->password = app('cipher')->hash($new_passwd, config('secure.salt')); + $this->password = app('cipher')->hash($password, config('secure.salt')); } return $this->save();