mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 11:44:10 +09:00
Remove find account by question
This commit is contained in:
parent
d47aea0aba
commit
f02b70afb5
15 changed files with 13 additions and 328 deletions
|
|
@ -6,7 +6,6 @@
|
||||||
<action name="dispMemberLoginForm" type="view" />
|
<action name="dispMemberLoginForm" type="view" />
|
||||||
<action name="dispMemberFindAccount" type="view" />
|
<action name="dispMemberFindAccount" type="view" />
|
||||||
<action name="dispMemberResendAuthMail" type="view" />
|
<action name="dispMemberResendAuthMail" type="view" />
|
||||||
<action name="dispMemberGetTempPassword" type="view" />
|
|
||||||
<action name="dispMemberInfo" type="view" permission="member" />
|
<action name="dispMemberInfo" type="view" permission="member" />
|
||||||
<action name="dispMemberModifyInfo" type="view" permission="member" />
|
<action name="dispMemberModifyInfo" type="view" permission="member" />
|
||||||
<action name="dispMemberModifyPassword" type="view" permission="member" />
|
<action name="dispMemberModifyPassword" type="view" permission="member" />
|
||||||
|
|
|
||||||
|
|
@ -251,7 +251,7 @@ $lang->find_account_question_items['9'] = '가장 좋아하는 음식은?';
|
||||||
$lang->temp_password = '임시 비밀번호';
|
$lang->temp_password = '임시 비밀번호';
|
||||||
$lang->cmd_get_temp_password = '임시 비밀번호 발급';
|
$lang->cmd_get_temp_password = '임시 비밀번호 발급';
|
||||||
$lang->about_get_temp_password = '로그인 후 비밀번호 변경해 주세요.';
|
$lang->about_get_temp_password = '로그인 후 비밀번호 변경해 주세요.';
|
||||||
$lang->msg_question_not_allowed = '질문/답변을 통한 비밀번호 찾기는 허용되지 않습니다.';
|
$lang->msg_question_not_allowed = '질문/답변을 통한 비밀번호 찾기 기능은 이 사이트에서 사용할 수 없습니다.';
|
||||||
$lang->msg_question_not_exists = '등록한 비밀번호 찾기 질문/답변이 없습니다.';
|
$lang->msg_question_not_exists = '등록한 비밀번호 찾기 질문/답변이 없습니다.';
|
||||||
$lang->msg_answer_not_matches = '비밀번호 찾기 질문/답변 또는 정보가 올바르지 않습니다.';
|
$lang->msg_answer_not_matches = '비밀번호 찾기 질문/답변 또는 정보가 올바르지 않습니다.';
|
||||||
$lang->change_password_date = '비밀번호 갱신주기';
|
$lang->change_password_date = '비밀번호 갱신주기';
|
||||||
|
|
|
||||||
|
|
@ -21,43 +21,3 @@
|
||||||
<input type="submit" class="bn dark" value="{$lang->cmd_send_mail}" />
|
<input type="submit" class="bn dark" value="{$lang->cmd_send_mail}" />
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<block cond="count($lang->find_account_question_items)>1">
|
|
||||||
<div class="hx h2"><h2>{$lang->cmd_find_member_account_with_email_question}</h2></div>
|
|
||||||
<p style="margin:3px 10px;color:#666">{$lang->about_find_account_question}</p>
|
|
||||||
|
|
||||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/member/m.skin/default/find_member_account/2'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
|
||||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<form action="./" method="post" class="ff" ruleset="@find_member_account_by_question">
|
|
||||||
<input type="hidden" name="module" value="member" />
|
|
||||||
<input type="hidden" name="mid" value="{$mid}" />
|
|
||||||
<input type="hidden" name="document_srl" value="{$document_srl}" />
|
|
||||||
<input type="hidden" name="act" value="procMemberFindAccountByQuestion" />
|
|
||||||
<input type="hidden" name="success_return_url" value="{getUrl('', 'act', 'dispMemberGetTempPassword')}" />
|
|
||||||
<input type="hidden" name="page" value="{$page}" />
|
|
||||||
<input type="hidden" name="xe_validator_id" value="modules/member/m.skin/default/find_member_account/2" />
|
|
||||||
<ul>
|
|
||||||
<li cond="$identifier == 'user_id'">
|
|
||||||
<label for="user_id2">{$lang->user_id}</label>
|
|
||||||
<input type="text" name="user_id" id="user_id2" />
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<label for="email_address2">{$lang->email_address}</label>
|
|
||||||
<input type="email" name="email_address" id="email_address2" />
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<label for="question">{$lang->find_account_question}</label>
|
|
||||||
<select id="question" name="find_account_question" style="width:290px;display:block;">
|
|
||||||
<!--@for($i=1,$c=count($lang->find_account_question_items);$i<=$c;$i++)-->
|
|
||||||
<option value="{$i}">{$lang->find_account_question_items[$i]}</option>
|
|
||||||
<!--@end-->
|
|
||||||
</select>
|
|
||||||
<input type="text" name="find_account_answer" value="" />
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<div class="bna">
|
|
||||||
<input type="submit" class="bn dark" value="{$lang->cmd_get_temp_password}" />
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</block>
|
|
||||||
|
|
|
||||||
|
|
@ -179,7 +179,6 @@ class memberAdminController extends member
|
||||||
$args = Context::gets(
|
$args = Context::gets(
|
||||||
'enable_join',
|
'enable_join',
|
||||||
'enable_confirm',
|
'enable_confirm',
|
||||||
'enable_find_account_question',
|
|
||||||
'password_strength',
|
'password_strength',
|
||||||
'password_hashing_algorithm',
|
'password_hashing_algorithm',
|
||||||
'password_hashing_work_factor',
|
'password_hashing_work_factor',
|
||||||
|
|
@ -303,7 +302,7 @@ class memberAdminController extends member
|
||||||
// signupForm
|
// signupForm
|
||||||
global $lang;
|
global $lang;
|
||||||
$signupForm = array();
|
$signupForm = array();
|
||||||
$items = array('user_id', 'password', 'user_name', 'nick_name', 'email_address', 'find_account_question', 'homepage', 'blog', 'birthday', 'signature', 'profile_image', 'image_name', 'image_mark', 'profile_image_max_width', 'profile_image_max_height', 'image_name_max_width', 'image_name_max_height', 'image_mark_max_width', 'image_mark_max_height');
|
$items = array('user_id', 'password', 'user_name', 'nick_name', 'email_address', 'homepage', 'blog', 'birthday', 'signature', 'profile_image', 'image_name', 'image_mark', 'profile_image_max_width', 'profile_image_max_height', 'image_name_max_width', 'image_name_max_height', 'image_mark_max_width', 'image_mark_max_height');
|
||||||
$mustRequireds = array('email_address', 'nick_name', 'password');
|
$mustRequireds = array('email_address', 'nick_name', 'password');
|
||||||
$extendItems = $oMemberModel->getJoinFormList();
|
$extendItems = $oMemberModel->getJoinFormList();
|
||||||
foreach($list_order as $key)
|
foreach($list_order as $key)
|
||||||
|
|
@ -356,7 +355,6 @@ class memberAdminController extends member
|
||||||
// create Ruleset
|
// create Ruleset
|
||||||
$this->_createSignupRuleset($signupForm, $args->agreement);
|
$this->_createSignupRuleset($signupForm, $args->agreement);
|
||||||
$this->_createLoginRuleset($args->identifier);
|
$this->_createLoginRuleset($args->identifier);
|
||||||
$this->_createFindAccountByQuestion($args->identifier);
|
|
||||||
|
|
||||||
// check agreement value exist
|
// check agreement value exist
|
||||||
if($args->agreement)
|
if($args->agreement)
|
||||||
|
|
@ -457,7 +455,7 @@ class memberAdminController extends member
|
||||||
// Get join form list which is additionally set
|
// Get join form list which is additionally set
|
||||||
$extendItems = $oMemberModel->getJoinFormList();
|
$extendItems = $oMemberModel->getJoinFormList();
|
||||||
|
|
||||||
$items = array('user_id', 'password', 'user_name', 'nick_name', 'email_address', 'find_account_question', 'homepage', 'blog', 'birthday', 'signature', 'profile_image', 'image_name', 'image_mark');
|
$items = array('user_id', 'password', 'user_name', 'nick_name', 'email_address', 'homepage', 'blog', 'birthday', 'signature', 'profile_image', 'image_name', 'image_mark');
|
||||||
$mustRequireds = array('email_address', 'nick_name', 'password');
|
$mustRequireds = array('email_address', 'nick_name', 'password');
|
||||||
$orgRequireds = array('email_address', 'password', 'user_id', 'nick_name', 'user_name');
|
$orgRequireds = array('email_address', 'password', 'user_id', 'nick_name', 'user_name');
|
||||||
$orgUse = array('email_address', 'password', 'user_id', 'nick_name', 'user_name', 'homepage', 'blog', 'birthday');
|
$orgUse = array('email_address', 'password', 'user_id', 'nick_name', 'user_name', 'homepage', 'blog', 'birthday');
|
||||||
|
|
@ -475,7 +473,7 @@ class memberAdminController extends member
|
||||||
$signupItem->required = in_array($key, $orgRequireds);
|
$signupItem->required = in_array($key, $orgRequireds);
|
||||||
$signupItem->isUse = ($config->{$key} == 'Y') || in_array($key, $orgUse);
|
$signupItem->isUse = ($config->{$key} == 'Y') || in_array($key, $orgUse);
|
||||||
$signupItem->isPublic = ($signupItem->isUse) ? 'Y' : 'N';
|
$signupItem->isPublic = ($signupItem->isUse) ? 'Y' : 'N';
|
||||||
if($key == 'find_account_question' || $key == 'password')
|
if($key == 'password')
|
||||||
{
|
{
|
||||||
$signupItem->isPublic = 'N';
|
$signupItem->isPublic = 'N';
|
||||||
}
|
}
|
||||||
|
|
@ -626,28 +624,7 @@ class memberAdminController extends member
|
||||||
*/
|
*/
|
||||||
function _createFindAccountByQuestion($identifier)
|
function _createFindAccountByQuestion($identifier)
|
||||||
{
|
{
|
||||||
$xml_file = './files/ruleset/find_member_account_by_question.xml';
|
|
||||||
$buff = '<?xml version="1.0" encoding="utf-8"?>'.
|
|
||||||
'<ruleset version="1.5.0">'.
|
|
||||||
'<customrules>'.
|
|
||||||
'</customrules>'.
|
|
||||||
'<fields>%s</fields>'.
|
|
||||||
'</ruleset>';
|
|
||||||
|
|
||||||
$fields = array();
|
|
||||||
if($identifier == 'user_id')
|
|
||||||
$fields[] = '<field name="user_id" required="true" rule="userid" />';
|
|
||||||
|
|
||||||
$fields[] = '<field name="email_address" required="true" rule="email" />';
|
|
||||||
$fields[] = '<field name="find_account_question" required="true" />';
|
|
||||||
$fields[] = '<field name="find_account_answer" required="true" length=":250"/>';
|
|
||||||
|
|
||||||
$xml_buff = sprintf($buff, implode('', $fields));
|
|
||||||
Filehandler::writeFile($xml_file, $xml_buff);
|
|
||||||
|
|
||||||
$validator = new Validator($xml_file);
|
|
||||||
$validator->setCacheDir('files/cache');
|
|
||||||
$validator->getJsPath();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -522,45 +522,7 @@ class memberAdminView extends member
|
||||||
}
|
}
|
||||||
else if($formInfo->name == 'find_account_question')
|
else if($formInfo->name == 'find_account_question')
|
||||||
{
|
{
|
||||||
if($memberInfo['member_srl'] && $memberInfo['member_srl'] !== $logged_info->member_srl)
|
continue;
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$optionTag = array();
|
|
||||||
foreach($lang->find_account_question_items as $key => $val)
|
|
||||||
{
|
|
||||||
$selected = ($key == $memberInfo['find_account_question']) ? 'selected="selected"' : '';
|
|
||||||
$optionTag[] = sprintf('<option value="%s" %s >%s</option>', $key, $selected, $val);
|
|
||||||
}
|
|
||||||
$is_answer = $memberInfo['find_account_answer'] ? '**********' : '';
|
|
||||||
$disabled = $memberInfo['member_srl'] ? 'disabled="disabled"' : '';
|
|
||||||
|
|
||||||
$formTag->type = 'select';
|
|
||||||
$inputTag = sprintf('<select name="find_account_question" id="find_account_question" style="display:block;margin:0 0 8px 0" %s>%s</select>', $disabled, implode('', $optionTag));
|
|
||||||
$inputTag .= sprintf('<input type="text" name="find_account_answer" id="find_account_answer" title="%s" value="%s" %s />', $lang->find_account_answer, $is_answer, $disabled);
|
|
||||||
|
|
||||||
if($disabled)
|
|
||||||
{
|
|
||||||
$inputTag .= <<< script
|
|
||||||
<label><input type="checkbox" name="modify_find_account_answer" value="Y" /> {$lang->cmd_modify}</label>
|
|
||||||
<script>
|
|
||||||
(function($) {
|
|
||||||
$(function() {
|
|
||||||
$('[name=modify_find_account_answer]').change(function() {
|
|
||||||
if($(this).prop('checked')) {
|
|
||||||
$('[name=find_account_question],[name=find_account_answer]').attr('disabled', false);
|
|
||||||
$('[name=find_account_answer]').val('');
|
|
||||||
} else {
|
|
||||||
$('[name=find_account_question],[name=find_account_answer]').attr('disabled', true);
|
|
||||||
$('[name=find_account_answer]').val('{$is_answer}');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
})(jQuery);
|
|
||||||
</script>
|
|
||||||
script;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if($formInfo->name == 'email_address')
|
else if($formInfo->name == 'email_address')
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -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
|
// Set to use SSL upon actions related member join/information/password and so on. 2013.02.15
|
||||||
if(!Context::isExistsSSLAction('dispMemberModifyPassword') && Context::getSslStatus() == 'optional')
|
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', 'procMemberResendAuthMail', 'procMemberLeave'/*, 'getMemberMenu'*/, 'procMemberFindAccountByQuestion');
|
$ssl_actions = array('dispMemberModifyPassword', 'dispMemberSignUpForm', 'dispMemberModifyInfo', 'dispMemberModifyEmailAddress', 'dispMemberResendAuthMail', 'dispMemberLoginForm', 'dispMemberFindAccount', 'dispMemberLeave', 'procMemberLogin', 'procMemberModifyPassword', 'procMemberInsert', 'procMemberModifyInfo', 'procMemberFindAccount', 'procMemberModifyEmailAddress', 'procMemberResendAuthMail', 'procMemberLeave'/*, 'getMemberMenu'*/, 'procMemberFindAccountByQuestion');
|
||||||
Context::addSSLActions($ssl_actions);
|
Context::addSSLActions($ssl_actions);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -100,7 +100,6 @@ class member extends ModuleObject {
|
||||||
FileHandler::makeDir('./files/ruleset');
|
FileHandler::makeDir('./files/ruleset');
|
||||||
$oMemberAdminController->_createSignupRuleset($config->signupForm);
|
$oMemberAdminController->_createSignupRuleset($config->signupForm);
|
||||||
$oMemberAdminController->_createLoginRuleset($config->identifier);
|
$oMemberAdminController->_createLoginRuleset($config->identifier);
|
||||||
$oMemberAdminController->_createFindAccountByQuestion($config->identifier);
|
|
||||||
}
|
}
|
||||||
$oModuleController->insertModuleConfig('member',$config);
|
$oModuleController->insertModuleConfig('member',$config);
|
||||||
|
|
||||||
|
|
@ -237,7 +236,6 @@ class member extends ModuleObject {
|
||||||
|
|
||||||
if(!is_readable('./files/ruleset/insertMember.xml')) return true;
|
if(!is_readable('./files/ruleset/insertMember.xml')) return true;
|
||||||
if(!is_readable('./files/ruleset/login.xml')) return true;
|
if(!is_readable('./files/ruleset/login.xml')) return true;
|
||||||
if(!is_readable('./files/ruleset/find_member_account_by_question.xml')) return true;
|
|
||||||
|
|
||||||
// 2013. 11. 22 add menu when popup document menu called
|
// 2013. 11. 22 add menu when popup document menu called
|
||||||
if(!$oModuleModel->getTrigger('document.getDocumentMenu', 'member', 'controller', 'triggerGetDocumentMenu', 'after')) return true;
|
if(!$oModuleModel->getTrigger('document.getDocumentMenu', 'member', 'controller', 'triggerGetDocumentMenu', 'after')) return true;
|
||||||
|
|
@ -389,8 +387,6 @@ class member extends ModuleObject {
|
||||||
$oMemberAdminController->_createSignupRuleset($config->signupForm);
|
$oMemberAdminController->_createSignupRuleset($config->signupForm);
|
||||||
if(!is_readable('./files/ruleset/login.xml'))
|
if(!is_readable('./files/ruleset/login.xml'))
|
||||||
$oMemberAdminController->_createLoginRuleset($config->identifier);
|
$oMemberAdminController->_createLoginRuleset($config->identifier);
|
||||||
if(!is_readable('./files/ruleset/find_member_account_by_question.xml'))
|
|
||||||
$oMemberAdminController->_createFindAccountByQuestion($config->identifier);
|
|
||||||
|
|
||||||
// 2013. 11. 22 add menu when popup document menu called
|
// 2013. 11. 22 add menu when popup document menu called
|
||||||
if(!$oModuleModel->getTrigger('document.getDocumentMenu', 'member', 'controller', 'triggerGetDocumentMenu', 'after'))
|
if(!$oModuleModel->getTrigger('document.getDocumentMenu', 'member', 'controller', 'triggerGetDocumentMenu', 'after'))
|
||||||
|
|
|
||||||
|
|
@ -1410,82 +1410,7 @@ class memberController extends member
|
||||||
*/
|
*/
|
||||||
function procMemberFindAccountByQuestion()
|
function procMemberFindAccountByQuestion()
|
||||||
{
|
{
|
||||||
$oMemberModel = getModel('member');
|
return new Object(-1, 'msg_question_not_allowed');
|
||||||
$config = $oMemberModel->getMemberConfig();
|
|
||||||
if($config->enable_find_account_question != 'Y')
|
|
||||||
{
|
|
||||||
return new Object(-1, 'msg_question_not_allowed');
|
|
||||||
}
|
|
||||||
|
|
||||||
$email_address = Context::get('email_address');
|
|
||||||
$user_id = Context::get('user_id');
|
|
||||||
$find_account_question = trim(Context::get('find_account_question'));
|
|
||||||
$find_account_answer = trim(Context::get('find_account_answer'));
|
|
||||||
if(($config->identifier == 'user_id' && !$user_id) || !$email_address || !$find_account_question || !$find_account_answer)
|
|
||||||
{
|
|
||||||
return new Object(-1, 'msg_invalid_request');
|
|
||||||
}
|
|
||||||
|
|
||||||
$oModuleModel = getModel('module');
|
|
||||||
// Check if a member having the same email address exists
|
|
||||||
$member_srl = $oMemberModel->getMemberSrlByEmailAddress($email_address);
|
|
||||||
if(!$member_srl) return new Object(-1, 'msg_email_not_exists');
|
|
||||||
|
|
||||||
// Get information of the member
|
|
||||||
$columnList = array('member_srl', 'find_account_question', 'find_account_answer');
|
|
||||||
$member_info = $oMemberModel->getMemberInfoByMemberSrl($member_srl, 0, $columnList);
|
|
||||||
|
|
||||||
// Display a message if no answer is entered
|
|
||||||
if(!$member_info->find_account_question || !$member_info->find_account_answer)
|
|
||||||
{
|
|
||||||
return new Object(-1, 'msg_question_not_exists');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check question
|
|
||||||
if(trim($member_info->find_account_question) != $find_account_question)
|
|
||||||
{
|
|
||||||
return new Object(-1, 'msg_answer_not_matches');
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check answer
|
|
||||||
if(Rhymix\Framework\Password::checkAlgorithm($member_info->find_account_answer))
|
|
||||||
{
|
|
||||||
if(!Rhymix\Framework\Password::checkPassword($find_account_answer, $member_info->find_account_answer))
|
|
||||||
{
|
|
||||||
return new Object(-1, 'msg_answer_not_matches');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if($member_info->find_account_answer != $find_account_answer)
|
|
||||||
{
|
|
||||||
return new Object(-1, 'msg_answer_not_matches');
|
|
||||||
}
|
|
||||||
|
|
||||||
// update to encrypted answer
|
|
||||||
$this->updateFindAccountAnswer($member_srl, $find_account_answer);
|
|
||||||
}
|
|
||||||
|
|
||||||
if($config->identifier == 'email_address')
|
|
||||||
{
|
|
||||||
$user_id = $email_address;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update to a temporary password and set change_password_date to 1
|
|
||||||
$temp_password = Rhymix\Framework\Password::getRandomPassword(8);
|
|
||||||
|
|
||||||
$args = new stdClass();
|
|
||||||
$args->member_srl = $member_srl;
|
|
||||||
$args->password = $temp_password;
|
|
||||||
$args->change_password_date = '1';
|
|
||||||
$output = $this->updateMemberPassword($args);
|
|
||||||
if(!$output->toBool()) return $output;
|
|
||||||
|
|
||||||
$_SESSION['xe_temp_password_' . $user_id] = $temp_password;
|
|
||||||
$this->add('user_id', $user_id);
|
|
||||||
|
|
||||||
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'mid', Context::get('mid'), 'act', '');
|
|
||||||
$this->setRedirectUrl($returnUrl.'&user_id='.$user_id);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -648,29 +648,11 @@ class memberView extends member
|
||||||
$config = $this->member_config;
|
$config = $this->member_config;
|
||||||
|
|
||||||
Context::set('identifier', $config->identifier);
|
Context::set('identifier', $config->identifier);
|
||||||
Context::set('enable_find_account_question', $config->enable_find_account_question);
|
Context::set('enable_find_account_question', 'N');
|
||||||
|
|
||||||
$this->setTemplateFile('find_member_account');
|
$this->setTemplateFile('find_member_account');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Generate a temporary password
|
|
||||||
*/
|
|
||||||
function dispMemberGetTempPassword()
|
|
||||||
{
|
|
||||||
if(Context::get('is_logged')) return $this->stop('already_logged');
|
|
||||||
|
|
||||||
$user_id = Context::get('user_id');
|
|
||||||
$temp_password = $_SESSION['xe_temp_password_'.$user_id];
|
|
||||||
unset($_SESSION['xe_temp_password_'.$user_id]);
|
|
||||||
|
|
||||||
if(!$user_id||!$temp_password) return new Object(-1,'msg_invaild_request');
|
|
||||||
|
|
||||||
Context::set('temp_password', $temp_password);
|
|
||||||
|
|
||||||
$this->setTemplateFile('find_temp_password');
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Page of re-sending an authentication mail
|
* @brief Page of re-sending an authentication mail
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
<filter name="find_member_account_by_question" module="member" act="procMemberFindAccountByQuestion">
|
|
||||||
<form>
|
|
||||||
<node target="user_id" required="true" />
|
|
||||||
<node target="email_address" required="true" minlength="2" maxlength="255" filter="email" />
|
|
||||||
<node target="find_account_question" required="true" />
|
|
||||||
<node target="find_account_answer" required="true" maxlength="250" />
|
|
||||||
</form>
|
|
||||||
<parameter />
|
|
||||||
<response callback_func="completeFindMemberAccountByQuestion">
|
|
||||||
<tag name="error" />
|
|
||||||
<tag name="message" />
|
|
||||||
<tag name="user_id" />
|
|
||||||
</response>
|
|
||||||
</filter>
|
|
||||||
|
|
@ -19,41 +19,6 @@
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</section>
|
</section>
|
||||||
<hr cond="count($lang->find_account_question_items)>1 && $enable_find_account_question == 'Y'">
|
|
||||||
<section cond="count($lang->find_account_question_items)>1 && $enable_find_account_question == 'Y'">
|
|
||||||
<h1>{$lang->cmd_find_member_account_with_email_question}</h1>
|
|
||||||
<p>{$lang->about_find_account_question}</p>
|
|
||||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/member/skin/default/find_member_account/2'" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
|
||||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
|
||||||
</div>
|
|
||||||
<form action="{getUrl('', 'act', 'procMemberFindAccountByQuestion')}" method="post" ruleset="@find_member_account_by_question">
|
|
||||||
<input type="hidden" name="module" value="member" />
|
|
||||||
<input type="hidden" name="mid" value="{$mid}" />
|
|
||||||
<input type="hidden" name="document_srl" value="{$document_srl}" />
|
|
||||||
<input type="hidden" name="act" value="procMemberFindAccountByQuestion" />
|
|
||||||
<input type="hidden" name="success_return_url" value="{getUrl('', 'act', 'dispMemberGetTempPassword')}" />
|
|
||||||
<input type="hidden" name="page" value="{$page}" />
|
|
||||||
<input type="hidden" name="xe_validator_id" value="modules/member/skin/default/find_member_account/2" />
|
|
||||||
<div>
|
|
||||||
<input type="text" name="user_id" required placeholder="{$lang->user_id}" title="{$lang->user_id}" cond="$identifier == 'user_id'" />
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<input type="email" name="email_address" required placeholder="{$lang->email_address}" title="{$lang->email_address}" />
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<select name="find_account_question">
|
|
||||||
<!--@for($i=1,$c=count($lang->find_account_question_items);$i<=$c;$i++)-->
|
|
||||||
<option value="{$i}">{$lang->find_account_question_items[$i]}</option>
|
|
||||||
<!--@end-->
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<input type="text" name="find_account_answer" value="" required placeholder="{$lang->find_account_question}" title="{$lang->find_account_question}" />
|
|
||||||
</div>
|
|
||||||
<block cond="$captcha">{$captcha}<br /></block>
|
|
||||||
<input type="submit" class="btn btn-inverse" value="{$lang->cmd_get_temp_password}" style="min-width:220px" />
|
|
||||||
</form>
|
|
||||||
</section>
|
|
||||||
<hr>
|
<hr>
|
||||||
<section>
|
<section>
|
||||||
<h1>{$lang->cmd_resend_auth_mail}</h1>
|
<h1>{$lang->cmd_resend_auth_mail}</h1>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
<include target="./common_header.html" />
|
|
||||||
<h1>{$lang->cmd_find_member_account}</h1>
|
|
||||||
<p>{$lang->about_temp_password}</p>
|
|
||||||
<p>{$lang->user_id}: {$user_id}</p>
|
|
||||||
<p>{$lang->temp_password}: {$temp_password}</p>
|
|
||||||
<include target="./common_footer.html" />
|
|
||||||
|
|
@ -23,49 +23,6 @@
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</section>
|
</section>
|
||||||
<section class="sw-body" cond="count(lang('member.find_account_question_items'))>1 && $enable_find_account_question == 'Y'">
|
|
||||||
<h1>{$lang->cmd_find_member_account_with_email_question}</h1>
|
|
||||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/member/skin/simple_world/find_member_account/2'" class="rx_member-notice {$XE_VALIDATOR_MESSAGE_TYPE}">
|
|
||||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
|
||||||
</div>
|
|
||||||
<p cond="!$XE_VALIDATOR_MESSAGE || $XE_VALIDATOR_ID !== 'modules/member/skin/simple_world/find_member_account/2'" class="rx_member-notice">
|
|
||||||
{lang('member.about_find_account_question')}
|
|
||||||
</p>
|
|
||||||
<form action="{getUrl('', 'act', 'procMemberFindAccountByQuestion')}" method="post" ruleset="@find_member_account_by_question">
|
|
||||||
<input type="hidden" name="module" value="member" />
|
|
||||||
<input type="hidden" name="mid" value="{$mid}" />
|
|
||||||
<input type="hidden" name="document_srl" value="{$document_srl}" />
|
|
||||||
<input type="hidden" name="act" value="procMemberFindAccountByQuestion" />
|
|
||||||
<input type="hidden" name="success_return_url" value="{getUrl('', 'act', 'dispMemberGetTempPassword')}" />
|
|
||||||
<input type="hidden" name="page" value="{$page}" />
|
|
||||||
<input type="hidden" name="xe_validator_id" value="modules/member/skin/simple_world/find_member_account/2" />
|
|
||||||
<div class="control-group">
|
|
||||||
<label for="user_id" cond="$identifier == 'user_id'">
|
|
||||||
{lang('common.user_id')}
|
|
||||||
</label>
|
|
||||||
<input type="text" name="user_id" id="user_id" required title="{lang('common.user_id')}" cond="$identifier == 'user_id'" />
|
|
||||||
<label for="email_address2">
|
|
||||||
{lang('common.email_address')}
|
|
||||||
</label>
|
|
||||||
<input type="email" name="email_address" id="email_address2" required title="{lang('common.email_address')}" />
|
|
||||||
<label for="find_account_question">
|
|
||||||
{lang('member.find_account_question')}
|
|
||||||
</label>
|
|
||||||
<select name="find_account_question" id="find_account_question">
|
|
||||||
<!--@for($i=1,$c=count(lang('member.find_account_question_items'));$i<=$c;$i++)-->
|
|
||||||
<option value="{$i}">{lang('member.find_account_question_items')[$i]}</option>
|
|
||||||
<!--@end-->
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="control-group">
|
|
||||||
<input type="text" name="find_account_answer" value="" required title="{lang('member.find_account_question')}" />
|
|
||||||
</div>
|
|
||||||
<div class="control-group">
|
|
||||||
<block cond="$captcha">{$captcha}<br /></block>
|
|
||||||
<input type="submit" value="{lang('member.cmd_get_temp_password')}" />
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</section>
|
|
||||||
<section class="sw-body">
|
<section class="sw-body">
|
||||||
<h1>{lang('member.cmd_resend_auth_mail')}</h1>
|
<h1>{lang('member.cmd_resend_auth_mail')}</h1>
|
||||||
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/member/skin/simple_world/find_member_account/3'" class="rx_member-notice {$XE_VALIDATOR_MESSAGE_TYPE}">
|
<div cond="$XE_VALIDATOR_MESSAGE && $XE_VALIDATOR_ID == 'modules/member/skin/simple_world/find_member_account/3'" class="rx_member-notice {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||||
|
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
<include target="./common_header.html" />
|
|
||||||
<section class="sw-body">
|
|
||||||
<h1>{lang('member.cmd_find_member_account')}</h1>
|
|
||||||
<div class="rx_member-notice">{lang('member.about_temp_password')}</div>
|
|
||||||
<dl>
|
|
||||||
<dt>{lang('common.user_id')}</dt>
|
|
||||||
<dd>{$user_id}</dd>
|
|
||||||
<dt>{lang('member.temp_password')}</dt>
|
|
||||||
<dd>{$temp_password}</dd>
|
|
||||||
</dl>
|
|
||||||
</section>
|
|
||||||
<include target="./common_footer.html" />
|
|
||||||
|
|
@ -36,14 +36,6 @@
|
||||||
<p class="x_help-block">{$lang->about_update_nickname_log}</p>
|
<p class="x_help-block">{$lang->about_update_nickname_log}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="x_control-group">
|
|
||||||
<div class="x_control-label">{$lang->enable_find_account_question}</div>
|
|
||||||
<div class="x_controls">
|
|
||||||
<label class="x_inline" for="enable_find_account_question_yes"><input type="radio" name="enable_find_account_question" id="enable_find_account_question_yes" value="Y" checked="checked"|cond="$config->enable_find_account_question == 'Y'" /> {$lang->cmd_yes}</label>
|
|
||||||
<label class="x_inline" for="enable_find_account_question_no"><input type="radio" name="enable_find_account_question" id="enable_find_account_question_no" value="N" checked="checked"|cond="$config->enable_find_account_question != 'Y'"/> {$lang->cmd_no}</label>
|
|
||||||
<p class="x_help-block">{$lang->about_enable_find_account_question}</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="x_control-group">
|
<div class="x_control-group">
|
||||||
<div class="x_control-label">{$lang->cmd_config_password_strength}</div>
|
<div class="x_control-label">{$lang->cmd_config_password_strength}</div>
|
||||||
<div class="x_controls">
|
<div class="x_controls">
|
||||||
|
|
|
||||||
|
|
@ -108,9 +108,11 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody class="uDrag">
|
<tbody class="uDrag">
|
||||||
{@$fixed_public_list = array('nick_name', 'find_account_question', 'password')}
|
{@ $disabled_list = array('find_account_question')}
|
||||||
|
{@ $fixed_public_list = array('nick_name', 'password')}
|
||||||
<!--@foreach($config->signupForm as $item)-->
|
<!--@foreach($config->signupForm as $item)-->
|
||||||
<!--@if($item->isIdentifier)-->
|
<!--@if(in_array($item->name, $disabled_list))-->
|
||||||
|
<!--@elseif($item->isIdentifier)-->
|
||||||
<tr class="sticky">
|
<tr class="sticky">
|
||||||
<input type="hidden" name="list_order[]" value="{$item->name}" />
|
<input type="hidden" name="list_order[]" value="{$item->name}" />
|
||||||
<input type="hidden" name="usable_list[]" value="{$item->name}"/>
|
<input type="hidden" name="usable_list[]" value="{$item->name}"/>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue