feat: 관리자 회원 수정에 본인확인 정보 삭제 기능 추가
CI·DI 관련 식별값, 본인확인·성인인증 상태, 생년월일·성별과 인증 이력을 별도 요청으로 정리한다. 일반 회원정보와 이메일 인증 상태는 유지하고 삭제할 정보가 없는 경우 버튼을 숨긴다. 회원 수정·삭제 권한과 대상 회원 등급, POST·관리자 토큰·요청 출처를 검증한다. 검증: 변경 PHP 3개 문법 검사, 임시 DB의 권한·토큰·출처·대상 정보 삭제 및 다른 회원 보존 검사 통과. 브라우저에서 별도 폼 제출과 관리자 토큰 삽입 확인.
This commit is contained in:
1 parent
672d05f968
commit
69709a79a7
3 files changed
+75
No files matched your search
@@ -478,6 +478,30 @@ function check_log_folder($log_path, $is_delete = true)
|
||||
}
|
||||
}
|
||||
|
||||
// 회원 본인확인 식별값과 인증 이력만 정리한다. 호출부에서 관리자 권한을 검증한다.
|
||||
function admin_clear_member_certification($mb_id)
|
||||
{
|
||||
global $g5;
|
||||
|
||||
$esc_mb_id = sql_real_escape_string($mb_id);
|
||||
$history_table = isset($g5['member_cert_history_table']) ? $g5['member_cert_history_table'] : G5_TABLE_PREFIX.'member_cert_history';
|
||||
|
||||
// 일반 회원정보(이름·연락처)와 이메일 인증 상태는 유지한다.
|
||||
if (!sql_query(" update {$g5['member_table']}
|
||||
set mb_certify = '', mb_adult = 0, mb_dupinfo = '', mb_birth = '', mb_sex = ''
|
||||
where mb_id = '{$esc_mb_id}' ", false)) {
|
||||
return false;
|
||||
}
|
||||
if (!sql_query(" delete from {$history_table} where mb_id = '{$esc_mb_id}' ", false)) {
|
||||
return false;
|
||||
}
|
||||
if (!sql_query(" delete from {$g5['cert_history_table']} where mb_id = '{$esc_mb_id}' ", false)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// POST로 넘어온 토큰과 세션에 저장된 토큰 비교
|
||||
function check_admin_token()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user