Fix: cannot login with canceled maestroID
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
function AccountUtil() {
|
||||
}
|
||||
|
||||
AccountUtil.isPlayableType = function(accountType) {
|
||||
var isPlayable = false;
|
||||
switch(accountType) {
|
||||
case 100: // experience player
|
||||
case 101: // experience maestro
|
||||
|
||||
case 1: // 20 players
|
||||
case 2: // 50 players
|
||||
case 3: // 100 players
|
||||
case 4: // 500 players
|
||||
case 5: // 1,000 players
|
||||
isPlayable = true;
|
||||
break;
|
||||
|
||||
case 100: // cancel
|
||||
default:
|
||||
isPlayable = false;
|
||||
break;
|
||||
}
|
||||
|
||||
return isPlayable;
|
||||
}
|
||||
@@ -29,10 +29,20 @@ if($maestroInfo === NULL) {
|
||||
|
||||
$maestroID = $maestroInfo["maestroID"];
|
||||
$maestroAccountType = $maestroInfo["accountType"];
|
||||
$activateStatus = (int)$maestroInfo["activateStatus"];
|
||||
if($activateStatus == 0) {
|
||||
set_error_message("아직 유료 가입하지 않은 마에스트로 계정입니다.");
|
||||
send_result_fail();
|
||||
exit;
|
||||
} else if($activateStatus == 100) {
|
||||
set_error_message("죄송합니다. 등록이 취소된 마에스트로 계정입니다.");
|
||||
send_result_fail();
|
||||
exit;
|
||||
}
|
||||
|
||||
$playerInfo = get_login_data($maestroID, $name, $enterCode);
|
||||
if($playerInfo === NULL) {
|
||||
set_error_message("입력한 이름 / 입장번호와 일치하는 계정이 없습니다");
|
||||
set_error_message("입력한 이름 / 입장번호와 일치하는 계정이 없습니다.");
|
||||
send_result_fail();
|
||||
exit;
|
||||
}
|
||||
@@ -46,6 +56,7 @@ set_data("MaestroAccountType", $maestroAccountType);
|
||||
set_data("PlayerID", $playerID);
|
||||
set_data("PlayerName", $name);
|
||||
set_data("PlayerAccountType", $playerAccountType);
|
||||
|
||||
send_result_success();
|
||||
exit;
|
||||
|
||||
@@ -54,14 +65,14 @@ function get_maestro_id($maestroName) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
SELECT MaestroID, AccountType
|
||||
SELECT MaestroID, AccountType, ActivateStatus
|
||||
FROM maestro
|
||||
WHERE Name = ?
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param('s', $maestroName);
|
||||
$stmt->execute();
|
||||
$stmt->bind_result($maestroID, $accountType);
|
||||
$stmt->bind_result($maestroID, $accountType, $activateStatus);
|
||||
$returnValue = $stmt->fetch();
|
||||
$stmt->close();
|
||||
|
||||
@@ -70,6 +81,7 @@ function get_maestro_id($maestroName) {
|
||||
|
||||
$result["maestroID"] = $maestroID;
|
||||
$result["accountType"] = $accountType;
|
||||
$result["activateStatus"] = $activateStatus;
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user