mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-26 13:52:24 +09:00
fixed find_account logic
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9315 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
23678b790b
commit
fc302f5b16
9 changed files with 80 additions and 19 deletions
|
|
@ -214,6 +214,7 @@
|
|||
// create Ruleset
|
||||
$this->_createSignupRuleset($signupForm);
|
||||
$this->_createLoginRuleset($args->identifier);
|
||||
$this->_createFindAccountByQuestion($args->identifier);
|
||||
}
|
||||
$output = $oModuleController->updateModuleConfig('member', $args);
|
||||
// default setting end
|
||||
|
|
@ -270,11 +271,36 @@
|
|||
$fields[] = '<field name="password" required="true" />';
|
||||
|
||||
$xml_buff = sprintf($buff, implode('', $fields));
|
||||
FileHandler::writeFile($xml_file, $xml_buff);
|
||||
filehandler::writefile($xml_file, $xml_buff);
|
||||
|
||||
$validator = new Validator($xml_file);
|
||||
$validator->setCacheDir('files/cache');
|
||||
$validator->getJsPath();
|
||||
$validator = new validator($xml_file);
|
||||
$validator->setcachedir('files/cache');
|
||||
$validator->getjspath();
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue