From 3e2ff5b6c092172a0302f37a933d7d0ed86b20a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0?= Date: Fri, 13 Sep 2024 18:38:56 +0900 Subject: [PATCH] Automation init...3 --- .../MyStorage/Mangboard/UserLibrary.php | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/app/Libraries/MyStorage/Mangboard/UserLibrary.php b/app/Libraries/MyStorage/Mangboard/UserLibrary.php index beb06be..846f955 100644 --- a/app/Libraries/MyStorage/Mangboard/UserLibrary.php +++ b/app/Libraries/MyStorage/Mangboard/UserLibrary.php @@ -29,25 +29,25 @@ class UserLibrary extends WebLibrary // 로그인 메서드 public function login(string $host, string $id, string $password): bool|UserEntity { - $response = $this->getWebLibrary($host)->getResponse( - $host . getenv("mangboard.login.url"), - "post", - [ - 'form_params' => [ - 'user_id' => $id, - 'password' => $password, - ], - ] - ); - if ($response->getStatusCode() == 200) { - // $entity = $this->getUserModel()->getEntityByLoginCheck($id, $password); - $entity = $this->getUserModel()->getEntityByID($id); - if ($entity === null) { - throw new \Exception("{$id}는 회원이 아니거나 암호가 맞지 않습니다."); - } - } else { - throw new \Exception("연결실패:" . $response->getStatusCode()); - } + $entity = $this->getUserModel()->getEntityByID($id); + // $response = $this->getWebLibrary($host)->getResponse( + // $host . getenv("mangboard.login.url"), + // "post", + // [ + // 'form_params' => [ + // 'user_id' => $id, + // 'password' => $password, + // ], + // ] + // ); + // if ($response->getStatusCode() == 200) { + // $entity = $this->getUserModel()->getEntityByLoginCheck($id, $password); + // if ($entity === null) { + // throw new \Exception("{$id}는 회원이 아니거나 암호가 맞지 않습니다."); + // } + // } else { + // throw new \Exception("연결실패:" . $response->getStatusCode()); + // } log_message("notice", "{$id}로 로그인 성공"); return $entity; }