request->getPost(); $accountValidator = new AccountValidator(); $account = $accountValidator->checkAccount($post['account']); $newPassword = $accountValidator->checkPassword($post['new_password']); $verifyValidator = new VerifyValidator(); $verifyValidator->checkCode($post['account'], $post['verify_code']); $salt = PasswordUtil::salt(); $password = PasswordUtil::hash($newPassword, $salt); $account->salt = $salt; $account->password = $password; $account->update(); return $account; } }