Fix: client login.php
This commit is contained in:
@@ -10,9 +10,9 @@ $enterCode = $_POST["enter_code"];
|
||||
|
||||
|
||||
$maestroInfo = get_maestro_id($maestroName);
|
||||
if($maestroInfo === null) {
|
||||
send_error_message($replyJSON, "입력한 마에스트로 계정이 없습니다");
|
||||
$db_conn->close();
|
||||
if($maestroInfo === NULL) {
|
||||
set_error_message("입력한 마에스트로 계정이 없습니다");
|
||||
send_result_fail();
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -20,9 +20,9 @@ $maestroID = $maestroInfo["maestroID"];
|
||||
$maestroAccountType = $maestroInfo["accountType"];
|
||||
|
||||
$playerInfo = get_login_data($maestroID, $name, $enterCode);
|
||||
if($playerInfo === null) {
|
||||
send_error_message($replyJSON, "입력한 이름/입장번호와 일치하는 계정이 없습니다");
|
||||
$db_conn->close();
|
||||
if($playerInfo === NULL) {
|
||||
set_error_message("입력한 이름/입장번호와 일치하는 계정이 없습니다");
|
||||
send_result_fail();
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -51,12 +51,12 @@ function get_maestro_id($maestroName) {
|
||||
$stmt->bind_param('s', $maestroName);
|
||||
$stmt->execute();
|
||||
$stmt->bind_result($maestroID, $accountType);
|
||||
// while($stmt->fetch()) {
|
||||
// ;
|
||||
// }
|
||||
$stmt->fetch();
|
||||
$returnValue = $stmt->fetch();
|
||||
$stmt->close();
|
||||
|
||||
if($returnValue === NULL || $returnValue === FALSE)
|
||||
return NULL;
|
||||
|
||||
$result["maestroID"] = $maestroID;
|
||||
$result["accountType"] = $accountType;
|
||||
return $result;
|
||||
@@ -74,10 +74,12 @@ function get_login_data($maestroID, $name, $enterCode) {
|
||||
$stmt->bind_param('iss', $maestroID, $name, $enterCode);
|
||||
$stmt->execute();
|
||||
$stmt->bind_result($playerID, $accountType);
|
||||
// while($stmt->fetch())
|
||||
$stmt->fetch();
|
||||
$returnValue = $stmt->fetch();
|
||||
$stmt->close();
|
||||
|
||||
if($returnValue === NULL || $returnValue === FALSE)
|
||||
return NULL;
|
||||
|
||||
$result["playerID"] = $playerID;
|
||||
$result["accountType"] = $accountType;
|
||||
return $result;
|
||||
|
||||
Reference in New Issue
Block a user