휴면계정에서 복구된경우 회원레벨이..
본문
회원레벨이 1로 지정되어 있어 구매권한이 없다고 나옵니다.
휴면계정 복구시 회원레벨을 2로 지정하려면 어느파일에서 수정해야 하는지 알려주시면 감사 하겠습니다.
답변 2
restore_unlogin_member 찾으셔서 올려주세요.
적절한 위치에
sql_query(
" update {$g5['member_table']} set mb_level='2' where mb_id='$mb_id' "
);
//★추가★
이코드 적용하시면 휴먼계정 복귀시 레벨2로 세팅될거에요
영카트 버전이 어찌되시는지..
제가 확인한 아래 함수에는 문제가 없습니다.
레벨도 휴면계정 전환 이전으로 돌아갈텐데요..
일단
lib/common.lib.php 파일에서 function restore_unlogin_member 함수를 찾으세요.
// 휴면계정 정보복구
function restore_unlogin_member($mb_no, $mb_id, $password)
{
global $g5;
$exclude_field = array('mb_no', 'mb_id', 'mb_name', 'mb_nick', 'mb_password', 'mb_lost_certify', 'mb_email', 'mb_unlogin', 'mb_today_login');
$sql = " select mb_id, mb_email, mb_info from {$g5['unlogin_table']} where mb_id = '$mb_id' ";
$row = sql_fetch($sql);
if($row['mb_id']) {
$mb_flds = get_table_fields($g5['member_table']);
$info = unserialize(stripslashes($row['mb_info']));
$sql_common = array();
foreach($info as $key => $val) {
if(!in_array($key, $mb_flds))
continue;
if(in_array($key, $exclude_field))
continue;
$sql_common[] = " $key = '$val' ";
}
$sql_common[] = " mb_email = '{$row['mb_email']}', mb_unlogin = '0', mb_today_login = '".G5_TIME_YMDHIS."' ";
$sql_common[] = " mb_password = '$password' ";
$sql = " update {$g5['member_table']} set ".implode(",", $sql_common)." where mb_no = '$mb_no' and mb_id = '$mb_id' ";
sql_query($sql);
sql_query(" update {$g5['member_table']} set mb_level='2' where mb_id='$mb_id' "); //★추가★
}
// 휴면계정 테이블 정보삭제
$sql = " delete from {$g5['unlogin_table']} where mb_id = '$mb_id' ";
sql_query($sql);
}
!-->
답변을 작성하시기 전에 로그인 해주세요.