diff --git a/adm/member_form.php b/adm/member_form.php
index 412038070..ffedb6826 100644
--- a/adm/member_form.php
+++ b/adm/member_form.php
@@ -173,6 +173,28 @@ if(!isset($mb['mb_email_certify2'])) {
sql_query(" ALTER TABLE {$g5['member_table']} ADD `mb_email_certify2` varchar(255) NOT NULL DEFAULT '' AFTER `mb_email_certify` ", false);
}
+// 본인인증 내역 테이블 정보가 dbconfig에 없으면 소셜 테이블 정의
+if( !isset($g5['member_cert_history']) ){
+ $g5['member_cert_history_table'] = G5_TABLE_PREFIX.'member_cert_history';
+}
+// 멤버 본인인증 정보 변경 내역 테이블 없을 경우 생성
+if(isset($g5['member_cert_history_table']) && !sql_query(" DESC {$g5['member_cert_history_table']} ", false)) {
+ sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['member_cert_history_table']}` (
+ `ch_id` int(11) NOT NULL auto_increment,
+ `mb_id` varchar(20) NOT NULL DEFAULT '',
+ `ch_name` varchar(255) NOT NULL DEFAULT '',
+ `ch_hp` varchar(255) NOT NULL DEFAULT '',
+ `ch_birth` varchar(255) NOT NULL DEFAULT '',
+ `ch_type` varchar(20) NOT NULL DEFAULT '',
+ `ch_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
+ PRIMARY KEY (`ch_id`),
+ KEY `mb_id` (`mb_id`)
+ ) ", true);
+}
+
+$sql = "select * from {$g5['member_cert_history_table']} where mb_id = '{$mb_id}' order by ch_id asc";
+$mb_cert_history = sql_query($sql);
+
if ($mb['mb_intercept_date']) $g5['title'] = "차단된 ";
else $g5['title'] .= "";
$g5['title'] .= '회원 '.$html_title;
@@ -346,6 +368,34 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
|
+
+
+ |
+ |
+ |
+ |
+ |
+ |
+ |
+
+
+
diff --git a/bbs/member_cert_refresh_update.php b/bbs/member_cert_refresh_update.php
index 078e0f8f7..3e9beac9c 100644
--- a/bbs/member_cert_refresh_update.php
+++ b/bbs/member_cert_refresh_update.php
@@ -62,7 +62,13 @@ if ($config['cf_cert_use'] && $cert_type && $md5_cert_no) {
}
$sql = "update {$g5['member_table']} set {$sql_certify} where mb_id = '{$mb_id}'";
-sql_query($sql);
+$result = sql_query($sql, false);
+
+if($result){
+ if(get_session('ss_cert_hash') == md5($mb_name.$cert_type.get_session('ss_cert_birth').$md5_cert_no)) {
+ insert_member_cert_history($mb_id, $mb_name, $mb_hp, get_session('ss_cert_birth'), get_session('ss_cert_type') ); // 본인인증 후 정보 수정 시 내역 기록
+ }
+}
//===============================================================
diff --git a/bbs/register_form_update.php b/bbs/register_form_update.php
index 76b3ca1e8..972dff0a8 100644
--- a/bbs/register_form_update.php
+++ b/bbs/register_form_update.php
@@ -304,6 +304,10 @@ if ($w == '') {
set_session('ss_mb_reg', $mb_id);
+ if(get_session('ss_cert_hash') == md5($mb_name.$cert_type.get_session('ss_cert_birth').$md5_cert_no)) {
+ insert_member_cert_history($mb_id, $mb_name, $mb_hp, get_session('ss_cert_birth'), get_session('ss_cert_type') ); // 본인인증 후 정보 인서트시 내역 기록
+ }
+
} else if ($w == 'u') {
if (!trim(get_session('ss_mb_id')))
alert('로그인 되어 있지 않습니다.');
@@ -361,6 +365,10 @@ if ($w == '') {
{$sql_certify}
where mb_id = '$mb_id' ";
sql_query($sql);
+
+ if(get_session('ss_cert_hash') == md5($mb_name.$cert_type.get_session('ss_cert_birth').$md5_cert_no)) {
+ insert_member_cert_history($mb_id, $mb_name, $mb_hp, get_session('ss_cert_birth'), get_session('ss_cert_type') ); // 본인인증 후 정보 수정 시 내역 기록
+ }
}
diff --git a/install/gnuboard5.sql b/install/gnuboard5.sql
index c0bdcb9d5..f3d31467f 100644
--- a/install/gnuboard5.sql
+++ b/install/gnuboard5.sql
@@ -365,6 +365,25 @@ CREATE TABLE IF NOT EXISTS `g5_cert_history` (
-- --------------------------------------------------------
+--
+-- Table structure for table `g5_cert_history`
+--
+
+DROP TABLE IF EXISTS `g5_member_cert_history`;
+CREATE TABLE IF NOT EXISTS `g5_member_cert_history` (
+ `ch_id` int(11) NOT NULL auto_increment,
+ `mb_id` varchar(20) NOT NULL DEFAULT '',
+ `ch_name` varchar(255) NOT NULL DEFAULT '',
+ `ch_hp` varchar(255) NOT NULL DEFAULT '',
+ `ch_birth` varchar(255) NOT NULL DEFAULT '',
+ `ch_type` varchar(20) NOT NULL DEFAULT '',
+ `ch_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
+ PRIMARY KEY (`ch_id`),
+ KEY `mb_id` (`mb_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
--
-- Table structure for table `g5_group`
--
diff --git a/install/install_db.php b/install/install_db.php
index 60bdaccf0..68a579ac8 100644
--- a/install/install_db.php
+++ b/install/install_db.php
@@ -592,6 +592,7 @@ fwrite($f, "\$g5['faq_master_table'] = G5_TABLE_PREFIX.'faq_master'; // 자주
fwrite($f, "\$g5['new_win_table'] = G5_TABLE_PREFIX.'new_win'; // 새창 테이블\n");
fwrite($f, "\$g5['menu_table'] = G5_TABLE_PREFIX.'menu'; // 메뉴관리 테이블\n");
fwrite($f, "\$g5['social_profile_table'] = G5_TABLE_PREFIX.'member_social_profiles'; // 소셜 로그인 테이블\n");
+fwrite($f, "\$g5['member_cert_history_table'] = G5_TABLE_PREFIX.'member_cert_history'; // 본인인증 변경내역 테이블\n");
if($g5_shop_install) {
fwrite($f, "\n");
diff --git a/lib/common.lib.php b/lib/common.lib.php
index 73f122f66..cab0a8510 100644
--- a/lib/common.lib.php
+++ b/lib/common.lib.php
@@ -2764,6 +2764,41 @@ function insert_cert_history($mb_id, $company, $method)
sql_query($sql);
}
+// 본인확인 변경내역 기록
+function insert_member_cert_history($mb_id, $name, $hp, $birth, $type)
+{
+ global $g5;
+
+ // 본인인증 내역 테이블 정보가 dbconfig에 없으면 소셜 테이블 정의
+ if( !isset($g5['member_cert_history']) ){
+ $g5['member_cert_history_table'] = G5_TABLE_PREFIX.'member_cert_history';
+ }
+
+ // 멤버 본인인증 정보 변경 내역 테이블 없을 경우 생성
+ if(isset($g5['member_cert_history_table']) && !sql_query(" DESC {$g5['member_cert_history_table']} ", false)) {
+ sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['member_cert_history_table']}` (
+ `ch_id` int(11) NOT NULL auto_increment,
+ `mb_id` varchar(20) NOT NULL DEFAULT '',
+ `ch_name` varchar(255) NOT NULL DEFAULT '',
+ `ch_hp` varchar(255) NOT NULL DEFAULT '',
+ `ch_birth` varchar(255) NOT NULL DEFAULT '',
+ `ch_type` varchar(20) NOT NULL DEFAULT '',
+ `ch_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
+ PRIMARY KEY (`ch_id`),
+ KEY `mb_id` (`mb_id`)
+ ) ", true);
+ }
+
+ $sql = " insert into {$g5['member_cert_history_table']}
+ set mb_id = '{$mb_id}',
+ ch_name = '{$name}',
+ ch_hp = '{$hp}',
+ ch_birth = '{$birth}',
+ ch_type = '{$type}',
+ ch_datetime = '".G5_TIME_YMD." ".G5_TIME_HIS."'";
+ sql_query($sql);
+}
+
// 인증시도회수 체크
function certify_count_check($mb_id, $type)
{
diff --git a/plugin/social/register_member_update.php b/plugin/social/register_member_update.php
index ddbbb06b5..8502704f4 100644
--- a/plugin/social/register_member_update.php
+++ b/plugin/social/register_member_update.php
@@ -101,7 +101,7 @@ $mb_open = (isset($_POST['mb_open']) && $_POST['mb_open']) ? 1 : 0;
//===============================================================
// 본인확인
//---------------------------------------------------------------
-if($config['cf_cert_use'] && $config['cf_cert_req']){
+if($config['cf_cert_use']) {
$mb_hp = hyphen_hp_number($mb_hp);
if($config['cf_cert_use'] && get_session('ss_cert_type') && get_session('ss_cert_dupinfo')) {
// 중복체크
@@ -166,7 +166,10 @@ $sql = " insert into {$g5['member_table']}
$result = sql_query($sql, false);
if($result) {
-
+
+ if(get_session('ss_cert_hash') == md5($mb_name.$cert_type.get_session('ss_cert_birth').$md5_cert_no)) {
+ insert_member_cert_history($mb_id, $mb_name, $mb_hp, get_session('ss_cert_birth'), get_session('ss_cert_type') ); // 본인인증 후 정보 수정 시 내역 기록
+ }
// 회원가입 포인트 부여
insert_point($mb_id, $config['cf_register_point'], '회원가입 축하', '@member', $mb_id, '회원가입');