Fix: apply bootstrap - register
This commit is contained in:
@@ -19,16 +19,16 @@ if(!is_numeric($enterCode)) {
|
||||
*/
|
||||
|
||||
|
||||
$maestroID = hasMaestroName($maestro_name);
|
||||
$maestroID = has_maestro_name($maestro_name);
|
||||
if($maestroID !== null) {
|
||||
set_error_message($maestro_name." : 이미 등록된 마에스트로 계정입니다.");
|
||||
send_result_fail();
|
||||
exit;
|
||||
}
|
||||
|
||||
addMaestro($maestro_name, $password, $email, $account_type);
|
||||
add_maestro($maestro_name, $password, $email, $account_type);
|
||||
|
||||
$maestroID = hasMaestroName($maestro_name);
|
||||
$maestroID = has_maestro_name($maestro_name);
|
||||
if($maestroID === null) {
|
||||
set_error_message($maestro_name." : 알 수 없는 이유로 마에스트로 계정 등록이 취소되었습니다.");
|
||||
send_result_fail();
|
||||
@@ -41,7 +41,7 @@ exit;
|
||||
|
||||
|
||||
|
||||
function hasMaestroName($maestroName) {
|
||||
function has_maestro_name($maestroName) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
@@ -60,11 +60,11 @@ function hasMaestroName($maestroName) {
|
||||
return $maestroID;
|
||||
}
|
||||
|
||||
function addMaestro($maestro_name, $password, $email, $account_type) {
|
||||
function add_maestro($maestro_name, $password, $email, $account_type) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
INSERT INTO moty_maestro (Name, Password, Email, AccountType, ActivateStatus, UserCount, AcceptClausesDateTime, MaestroTestID)
|
||||
INSERT INTO moty_maestro (Name, Password, Email, AccountType, ActivateStatus, PlayerCount, AcceptClausesDateTime, MaestroTestID)
|
||||
VALUES (?, PASSWORD(?), ?, ?, 0, 0, NOW(), -1)";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param("sssi", $maestro_name, $password, $email, $account_type);
|
||||
|
||||
Reference in New Issue
Block a user