mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +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
|
|
@ -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){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue