From 09687039346dfcc31c7458bbe0c3e3e478a8f6f0 Mon Sep 17 00:00:00 2001 From: zero Date: Wed, 5 Aug 2009 07:11:28 +0000 Subject: [PATCH] =?UTF-8?q?#18205582,=20#18150330,=20=EB=A9=94=EC=9D=BC=20?= =?UTF-8?q?=EC=9D=B8=EC=A6=9D/=20=EB=B9=84=EB=B0=80=EB=B2=88=ED=98=B8=20?= =?UTF-8?q?=EC=B0=BE=EA=B8=B0=EB=93=B1=EC=9D=98=20=EB=A9=94=EC=9D=BC=20?= =?UTF-8?q?=EB=B0=9C=EC=86=A1=EC=8B=9C=20=EA=B2=BD=EB=A1=9C=EA=B0=80=20?= =?UTF-8?q?=EC=A0=9C=EB=8C=80=EB=A1=9C=20=EC=A0=84=EB=8B=AC=EB=90=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95.=20auth=5Fkey,=20member?= =?UTF-8?q?=5Fsrl=EB=93=B1=EC=9D=98=20=EA=B0=92=EC=9D=B4=20=EC=A0=9C?= =?UTF-8?q?=EB=8C=80=EB=A1=9C=20=EB=93=A4=EC=96=B4=EA=B0=80=EC=A7=80=20?= =?UTF-8?q?=EC=95=8A=EC=95=84=EC=84=9C=20=EC=9D=B8=EC=A6=9D=EC=9D=B4=20?= =?UTF-8?q?=EC=A0=9C=EB=8C=80=EB=A1=9C=20=EB=90=98=EC=A7=80=20=EC=95=8A?= =?UTF-8?q?=EB=8D=98=20=EB=AC=B8=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6723 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- config/func.inc.php | 15 ++++++++++++ modules/member/member.controller.php | 24 +++++++++++-------- modules/member/queries/getAuthMailInfo.xml | 11 +++++++++ .../default/confirm_member_account_mail.html | 2 +- .../skins/default/resend_auth_mail.html | 2 +- 5 files changed, 42 insertions(+), 12 deletions(-) create mode 100644 modules/member/queries/getAuthMailInfo.xml 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 @@ + + + + + + + + + + + diff --git a/modules/member/skins/default/confirm_member_account_mail.html b/modules/member/skins/default/confirm_member_account_mail.html index db7491edd..ba12e647b 100644 --- a/modules/member/skins/default/confirm_member_account_mail.html +++ b/modules/member/skins/default/confirm_member_account_mail.html @@ -9,4 +9,4 @@
{$lang->msg_confirm_account_comment}
-{Context::getRequestUri()}{getUrl('','module','member','act','procMemberAuthAccount','member_srl',$member_info->member_srl,'auth_key',$auth_args->auth_key)} +{$auth_url} diff --git a/modules/member/skins/default/resend_auth_mail.html b/modules/member/skins/default/resend_auth_mail.html index 96de292b5..4a142dcc5 100644 --- a/modules/member/skins/default/resend_auth_mail.html +++ b/modules/member/skins/default/resend_auth_mail.html @@ -17,4 +17,4 @@
- \ No newline at end of file +