mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 11:11:39 +09:00
Merge pull request #1508 from kijin/fix/procMemberUpdateAuthMail
member 모듈의 procMemberUpdateAuthMail act 삭제
This commit is contained in:
commit
f98877b340
3 changed files with 1 additions and 72 deletions
|
|
@ -66,7 +66,6 @@
|
|||
<action name="procMemberFindAccountByQuestion" type="controller" standalone="true" />
|
||||
<action name="procMemberAuthAccount" type="controller" method="GET|POST" standalone="true" />
|
||||
<action name="procMemberAuthEmailAddress" type="controller" method="GET|POST" standalone="true" />
|
||||
<action name="procMemberUpdateAuthMail" type="controller" standalone="true" />
|
||||
<action name="procMemberResendAuthMail" type="controller" ruleset="resendAuthMail" standalone="true" />
|
||||
<action name="procMemberResetAuthMail" type="controller" ruleset="resetAuthMail" standalone="true" />
|
||||
<action name="procMemberSpammerManage" type="controller" standalone="true" />
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class member extends ModuleObject {
|
|||
// Set to use SSL upon actions related member join/information/password and so on. 2013.02.15
|
||||
if(!Context::isExistsSSLAction('dispMemberModifyPassword') && Context::getSslStatus() == 'optional')
|
||||
{
|
||||
$ssl_actions = array('dispMemberModifyPassword', 'dispMemberSignUpForm', 'dispMemberModifyInfo', 'dispMemberModifyEmailAddress', 'dispMemberGetTempPassword', 'dispMemberResendAuthMail', 'dispMemberLoginForm', 'dispMemberFindAccount', 'dispMemberLeave', 'procMemberLogin', 'procMemberModifyPassword', 'procMemberInsert', 'procMemberModifyInfo', 'procMemberFindAccount', 'procMemberModifyEmailAddress', 'procMemberUpdateAuthMail', 'procMemberResendAuthMail', 'procMemberLeave'/*, 'getMemberMenu'*/, 'procMemberFindAccountByQuestion');
|
||||
$ssl_actions = array('dispMemberModifyPassword', 'dispMemberSignUpForm', 'dispMemberModifyInfo', 'dispMemberModifyEmailAddress', 'dispMemberGetTempPassword', 'dispMemberResendAuthMail', 'dispMemberLoginForm', 'dispMemberFindAccount', 'dispMemberLeave', 'procMemberLogin', 'procMemberModifyPassword', 'procMemberInsert', 'procMemberModifyInfo', 'procMemberFindAccount', 'procMemberModifyEmailAddress', 'procMemberResendAuthMail', 'procMemberLeave'/*, 'getMemberMenu'*/, 'procMemberFindAccountByQuestion');
|
||||
Context::addSSLActions($ssl_actions);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1158,76 +1158,6 @@ class memberController extends member
|
|||
$this->setTemplateFile('msg_success_authed');
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute finding ID/Passoword
|
||||
* When clicking the link in the verification email, a method is called to change the old password and to authenticate it
|
||||
*
|
||||
* @return Object
|
||||
*/
|
||||
function procMemberUpdateAuthMail()
|
||||
{
|
||||
$member_srl = Context::get('member_srl');
|
||||
if(!$member_srl) return new Object(-1, 'msg_invalid_request');
|
||||
|
||||
$oMemberModel = getModel('member');
|
||||
// Get information of the member
|
||||
$member_info = $oMemberModel->getMemberInfoByMemberSrl($member_srl);
|
||||
// Check if the member is set to allow a request to re-send an authentication mail
|
||||
if($member_info->denied != 'Y')
|
||||
return new Object(-1, 'msg_invalid_request');
|
||||
|
||||
$chk_args = new stdClass;
|
||||
$chk_args->member_srl = $member_srl;
|
||||
$output = executeQuery('member.chkAuthMail', $chk_args);
|
||||
if($output->toBool() && $output->data->count == '0') return new Object(-1, 'msg_invalid_request');
|
||||
|
||||
// Insert data into the authentication DB
|
||||
$auth_args = new stdClass;
|
||||
$auth_args->member_srl = $member_srl;
|
||||
$auth_args->auth_key = $oPassword->createSecureSalt(40);
|
||||
|
||||
$oDB = &DB::getInstance();
|
||||
$oDB->begin();
|
||||
$output = executeQuery('member.updateAuthMail', $auth_args);
|
||||
if(!$output->toBool())
|
||||
{
|
||||
$oDB->rollback();
|
||||
return $output;
|
||||
}
|
||||
// Get content of the email to send a member
|
||||
Context::set('auth_args', $auth_args);
|
||||
Context::set('memberInfo', $member_info);
|
||||
|
||||
$oModuleModel = getModel('module');
|
||||
$member_config = $oModuleModel->getModuleConfig('member');
|
||||
if(!$member_config->skin) $member_config->skin = "default";
|
||||
if(!$member_config->colorset) $member_config->colorset = "white";
|
||||
|
||||
Context::set('member_config', $member_config);
|
||||
|
||||
$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');
|
||||
// Get information of the Webmaster
|
||||
$oModuleModel = getModel('module');
|
||||
$member_config = $oModuleModel->getModuleConfig('member');
|
||||
// Send a mail
|
||||
$oMail = new Mail();
|
||||
$oMail->setTitle( Context::getLang('msg_confirm_account_title') );
|
||||
$oMail->setContent($content);
|
||||
$oMail->setSender( $member_config->webmaster_name?$member_config->webmaster_name:'webmaster', $member_config->webmaster_email);
|
||||
$oMail->setReceiptor( $member_info->user_name, $member_info->email_address );
|
||||
$oMail->send();
|
||||
// Return message
|
||||
$msg = sprintf(Context::getLang('msg_auth_mail_sent'), $member_info->email_address);
|
||||
return new Object(-1, $msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Request to re-send the authentication mail
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue