diff --git a/config/func.inc.php b/config/func.inc.php
index f220ef427..6437a2b6b 100644
--- a/config/func.inc.php
+++ b/config/func.inc.php
@@ -219,6 +219,21 @@
return Context::getUrl($num_args, $args_list);
}
+ /**
+ * @brief getUrl()의 값에 request uri를 추가하여 reutrn
+ * full url을 얻기 위함
+ **/
+ function getFullUrl() {
+ $num_args = func_num_args();
+ $args_list = func_get_args();
+
+ if(!$num_args) return Context::getRequestUri();
+
+ $url = Context::getUrl($num_args, $args_list);
+ if(!preg_match('/^http/i',$url)) return substr(Context::getRequestUri(),0,-1).$url;
+ return $url;
+ }
+
/**
* @brief Context::getUrl()를 쓰기 쉽게 함수로 선언
* @return string
diff --git a/modules/member/member.controller.php b/modules/member/member.controller.php
index 5f1e13c75..c9f87c1c4 100644
--- a/modules/member/member.controller.php
+++ b/modules/member/member.controller.php
@@ -966,8 +966,7 @@
$tpl_path = sprintf('%sskins/%s', $this->module_path, $member_config->skin);
if(!is_dir($tpl_path)) $tpl_path = sprintf('%sskins/%s', $this->module_path, 'default');
- $find_url = getUrl('','module','member','act','procMemberAuthAccount','member_srl',$member_info->member_srl, 'auth_key',$args->auth_key);
- if(!preg_match('/^http/i',$find_url)) $find_url = substr(Context::getRequestUri(),0,-1).$find_url;
+ $find_url = getFullUrl('','module','member','act','procMemberAuthAccount','member_srl',$member_info->member_srl, 'auth_key',$args->auth_key);
Context::set('find_url',$find_url);
@@ -1076,6 +1075,9 @@
$tpl_path = sprintf('%sskins/%s', $this->module_path, $member_config->skin);
if(!is_dir($tpl_path)) $tpl_path = sprintf('%sskins/%s', $this->module_path, 'default');
+ $auth_url = getFullUrl('','module','member','act','procMemberAuthAccount','member_srl',$member_info->member_srl, 'auth_key',$auth_args->auth_key);
+ Context::set('auth_url', $auth_url);
+
$oTemplate = &TemplateHandler::getInstance();
$content = $oTemplate->compile($tpl_path, 'confirm_member_account_mail');
@@ -1118,17 +1120,13 @@
$output = executeQuery('member.chkAuthMail', $chk_args);
if($output->toBool() && $output->data->count == '0') return new Object(-1, 'msg_invalid_request');
- // 인증 메일 재발송
- $auth_args->email_address = $auth_info->email_address = $args->email_address;
-
- $output = executeQuery('member.getAuthMail', $auth_args);
-
- $auth_info->auth_key = $output->data->auth_key;
+ $auth_args->member_srl = $member_info->member_srl;
+ $output = executeQueryArray('member.getAuthMailInfo', $auth_args);
+ if(!$output->data || !$output->data[0]->auth_key) return new Object(-1, 'msg_invalid_request');
+ $auth_info = $output->data[0];
// 메일 내용을 구함
- Context::set('auth_args', $auth_info);
Context::set('member_info', $member_info);
-
$oModuleModel = &getModel('module');
$member_config = $oModuleModel->getModuleConfig('member');
if(!$member_config->skin) $this->member_config->skin = "default";
@@ -1139,6 +1137,9 @@
$tpl_path = sprintf('%sskins/%s', $this->module_path, $member_config->skin);
if(!is_dir($tpl_path)) $tpl_path = sprintf('%sskins/%s', $this->module_path, 'default');
+ $auth_url = getFullUrl('','module','member','act','procMemberAuthAccount','member_srl',$member_info->member_srl, 'auth_key',$auth_info->auth_key);
+ Context::set('auth_url', $auth_url);
+
$oTemplate = &TemplateHandler::getInstance();
$content = $oTemplate->compile($tpl_path, 'confirm_member_account_mail');
@@ -1587,6 +1588,9 @@
$tpl_path = sprintf('%sskins/%s', $this->module_path, $member_config->skin);
if(!is_dir($tpl_path)) $tpl_path = sprintf('%sskins/%s', $this->module_path, 'default');
+ $auth_url = getFullUrl('','module','member','act','procMemberAuthAccount','member_srl',$args->member_srl, 'auth_key',$auth_args->auth_key);
+ Context::set('auth_url', $auth_url);
+
$oTemplate = &TemplateHandler::getInstance();
$content = $oTemplate->compile($tpl_path, 'confirm_member_account_mail');
diff --git a/modules/member/queries/getAuthMailInfo.xml b/modules/member/queries/getAuthMailInfo.xml
new file mode 100644
index 000000000..3897c8cd4
--- /dev/null
+++ b/modules/member/queries/getAuthMailInfo.xml
@@ -0,0 +1,11 @@
+
+