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