request->getPost(); $accountValidator = new AccountValidator(); $account = $accountValidator->checkLoginName($post['account']); $accountValidator->checkPassword($post['new_password']); $securityValidator = new SecurityValidator(); $securityValidator->checkVerifyCode($post['account'], $post['verify_code']); $account->password = $post['new_password']; $account->update(); return $account; } }