mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 18:51:41 +09:00
issue 668 if admin modify member info, find account question, answer change to not required
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9729 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
0f7bdf2075
commit
ecd528672b
5 changed files with 19 additions and 6 deletions
|
|
@ -68,7 +68,7 @@
|
|||
<action name="procMemberUpdateAuthMail" type="controller" standalone="true" />
|
||||
<action name="procMemberResendAuthMail" type="controller" standalone="true" ruleset="resendAuthMail" />
|
||||
|
||||
<action name="procMemberAdminInsert" type="controller" standalone="true" ruleset="@insertMember" />
|
||||
<action name="procMemberAdminInsert" type="controller" standalone="true" ruleset="@insertAdminMember" />
|
||||
<action name="procMemberAdminDelete" type="controller" standalone="true" />
|
||||
<action name="procMemberAdminInsertConfig" type="controller" standalone="true" ruleset="insertConfig" />
|
||||
<action name="procMemberAdminInsertGroup" type="controller" standalone="true" ruleset="insertGroup" />
|
||||
|
|
|
|||
|
|
@ -238,6 +238,7 @@
|
|||
|
||||
function _createSignupRuleset($signupForm){
|
||||
$xml_file = './files/ruleset/insertMember.xml';
|
||||
$admin_xml_file = './files/ruleset/insertAdmintMember.xml';
|
||||
$buff = '<?xml version="1.0" encoding="utf-8"?>'
|
||||
.'<ruleset version="1.5.0">'
|
||||
.'<customrules>'
|
||||
|
|
@ -254,8 +255,8 @@
|
|||
$fields[] = '<field name="password"><if test="$act == \'procMemberInsert\'" attr="required" value="true" /><if test="$act == \'procMemberInsert\'" attr="length" value="3:20" /></field>';
|
||||
$fields[] = '<field name="password2"><if test="$act == \'procMemberInsert\'" attr="required" value="true" /><if test="$act == \'procMemberInsert\'" attr="equalto" value="password" /></field>';
|
||||
}else if($formInfo->name == 'find_account_question'){
|
||||
$fields[] = '<field name="find_account_question" required="true" />';
|
||||
$fields[] = '<field name="find_account_answer" required="true" length=":250"/>';
|
||||
$fields[100] = '<field name="find_account_question" required="true" />';
|
||||
$fields[101] = '<field name="find_account_answer" required="true" length=":250"/>';
|
||||
}else if($formInfo->name == 'email_address'){
|
||||
$fields[] = sprintf('<field name="%s" required="true" rule="email"/>', $formInfo->name);
|
||||
}else if($formInfo->name == 'user_id'){
|
||||
|
|
@ -268,10 +269,23 @@
|
|||
|
||||
$xml_buff = sprintf($buff, implode('', $fields));
|
||||
FileHandler::writeFile($xml_file, $xml_buff);
|
||||
unset($xml_buff);
|
||||
|
||||
$adminFields = $fields;
|
||||
$adminFields[100] = '<field name="find_account_question" />';
|
||||
$adminFields[101] = '<field name="find_account_answer" length=":250"/>';
|
||||
|
||||
$xml_buff = sprintf($buff, implode('', $adminFields));
|
||||
FileHandler::writeFile($admin_xml_file, $xml_buff);
|
||||
unset($xml_buff);
|
||||
|
||||
$validator = new Validator($xml_file);
|
||||
$validator->setCacheDir('files/cache');
|
||||
$validator->getJsPath();
|
||||
|
||||
$adminValidator = new Validator($admin_xml_file);
|
||||
$adminValidator->setCacheDir('files/cache');
|
||||
$adminValidator->getJsPath();
|
||||
}
|
||||
|
||||
function _createLoginRuleset($identifier){
|
||||
|
|
|
|||
|
|
@ -1819,7 +1819,6 @@
|
|||
|
||||
if(!$args->description) $args->description = '';
|
||||
|
||||
|
||||
$output = executeQuery('member.updateMember', $args);
|
||||
if(!$output->toBool()) {
|
||||
$oDB->rollback();
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<column name="user_id" var="user_id" notnull="notnull" />
|
||||
<column name="email_address" var="email_address" notnull="notnull"/>
|
||||
<column name="find_account_question" var="find_account_question" />
|
||||
<column name="find_account_answer" var="find_account_answer" />
|
||||
<column name="find_account_answer" var="find_account_answer" default="" />
|
||||
<column name="homepage" var="homepage" default="" />
|
||||
<column name="blog" var="blog" default="" />
|
||||
<column name="birthday" var="birthday" />
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<div cond="$XE_VALIDATOR_MESSAGE" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
|
||||
<p>{$XE_VALIDATOR_MESSAGE}</p>
|
||||
</div>
|
||||
<form action="./" class="form" ruleset="@insertMember" method="post" enctype="multipart/form-data">
|
||||
<form action="./" class="form" ruleset="@insertAdminMember" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="module" value="member" />
|
||||
<input type="hidden" name="act" value="procMemberAdminInsert" />
|
||||
<input type="hidden" name="member_srl" value="{$member_srl}" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue