From e9da9b9bba6fe06aacd7e91202c19ac95e905d5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=A2=E1=84=91=E1=85=B3=E1=86=AF=20=E1=84=82?= =?UTF-8?q?=E1=85=A9=E1=84=90=E1=85=B3=E1=84=87=E1=85=AE=E1=86=A8?= Date: Mon, 3 Sep 2018 09:36:06 +0900 Subject: [PATCH] Fix: allow korean maestro id --- src/game/login/login.js | 6 +++++- src/web/js/lib/account_validator.js | 2 +- src/web/module/maestro_section_register.html | 5 +++-- src/web/server/maestro/login.php | 4 ++-- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/game/login/login.js b/src/game/login/login.js index 0225cff..4bacc74 100644 --- a/src/game/login/login.js +++ b/src/game/login/login.js @@ -30,7 +30,11 @@ class Login { this.makeMaestroNameText(textX, 200); this.makeNameText(textX, 300); this.makeEnterCodeText(textX, 360); - this.inputTextName.canvasInput.focus(); + + if(sessionStorageManager.maestroID === null) + this.inputTextMaestroName.canvasInput.focus(); + else + this.inputTextName.canvasInput.focus(); this.makeStartButton(game.world.centerX, game.world.centerY + 100); diff --git a/src/web/js/lib/account_validator.js b/src/web/js/lib/account_validator.js index dc276d9..fba09a0 100644 --- a/src/web/js/lib/account_validator.js +++ b/src/web/js/lib/account_validator.js @@ -1,7 +1,7 @@ class AccountValidator { constructor() { - this.patternMaestroID = /^[A-Za-z]{1}[A-Za-z0-9]{3,19}$/; + this.patternMaestroID = /^[A-Za-z가-힣]{1}[A-Za-z0-9가-힣]{2,19}$/; this.patternMaestroPW = /^[A-Za-z0-9]{4,16}$/; this.patternPlayerID = /^[A-Za-z0-9가-힣-_]{1,8}$/; diff --git a/src/web/module/maestro_section_register.html b/src/web/module/maestro_section_register.html index 2973d22..2416651 100644 --- a/src/web/module/maestro_section_register.html +++ b/src/web/module/maestro_section_register.html @@ -89,6 +89,7 @@ function checkData() { } password = $("#password").val(); + console.log("password : " + password); if(password.length === 0) { showErrorMessage("암호를 입력해 주세요.", "error"); $("#password").focus(); @@ -239,7 +240,7 @@ $('#myTab a').on('click', function (e) {
- 4~20 글자. 영문, 숫자만 사용 가능합니다. + 4~20 글자. 한글도 사용 가능합니다.
@@ -250,7 +251,7 @@ $('#myTab a').on('click', function (e) {
- + 4~16 글자. 영문, 숫자만 사용 가능합니다.
diff --git a/src/web/server/maestro/login.php b/src/web/server/maestro/login.php index 5878cdc..8740d3b 100644 --- a/src/web/server/maestro/login.php +++ b/src/web/server/maestro/login.php @@ -11,7 +11,7 @@ $password = $_POST["password"]; $maestroID = get_maestro_id($maestroName); if($maestroID === null) { set_error_code("not_registered_id"); - set_error_message("등록되지 않은 마에스트로 아이디입니다."); + set_error_message("등록되지 않았거나 아직 승인되지 않은 마에스트로 아이디입니다."); send_result_fail(); exit; } @@ -58,7 +58,7 @@ function get_maestro_id($maestroName) { $query = " SELECT MaestroID FROM maestro - WHERE Name = ? + WHERE Name = ? AND ActivateStatus = 1 "; $stmt = $db_conn->prepare($query); $stmt->bind_param("s", $maestroName);