mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
Record which agreement(s) a member has agreed to
약관을 2개 이상 지정하고 그 중 일부를 선택으로 할 수 있으므로 각 회원이 가입시 어떤 약관에 동의하고 어떤 약관에 동의하지 않았는지 확장변수로 저장하도록 하여 이후 문제발생 소지를 제거함.
This commit is contained in:
parent
0754a072c9
commit
9c42ba38ce
1 changed files with 17 additions and 1 deletions
|
|
@ -592,12 +592,23 @@ class memberController extends member
|
||||||
|
|
||||||
// Check if the user accept the license terms (only if terms exist)
|
// Check if the user accept the license terms (only if terms exist)
|
||||||
$accept_agreement = Context::get('accept_agreement');
|
$accept_agreement = Context::get('accept_agreement');
|
||||||
|
if(!is_array($accept_agreement))
|
||||||
|
{
|
||||||
|
$accept_agreement = array_fill(0, count($config->agreements), $accept_agreement);
|
||||||
|
}
|
||||||
|
$accept_agreement_rearranged = array();
|
||||||
foreach($config->agreements as $i => $agreement)
|
foreach($config->agreements as $i => $agreement)
|
||||||
{
|
{
|
||||||
if($agreement->type === 'required' && $accept_agreement !== 'Y' && $accept_agreement[$i] !== 'Y')
|
if($agreement->type === 'disabled')
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if($agreement->type === 'required' && $accept_agreement[$i] !== 'Y')
|
||||||
{
|
{
|
||||||
throw new Rhymix\Framework\Exception('msg_accept_agreement');
|
throw new Rhymix\Framework\Exception('msg_accept_agreement');
|
||||||
}
|
}
|
||||||
|
$accept_agreement_rearranged[$i] = $accept_agreement[$i] === 'Y' ? 'Y' : 'N';
|
||||||
|
$accept_agreement_rearranged[$i] .= ':' . date('YmdHis', RX_TIME);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Extract the necessary information in advance
|
// Extract the necessary information in advance
|
||||||
|
|
@ -659,6 +670,7 @@ class memberController extends member
|
||||||
|
|
||||||
// Remove some unnecessary variables from all the vars
|
// Remove some unnecessary variables from all the vars
|
||||||
$all_args = Context::getRequestVars();
|
$all_args = Context::getRequestVars();
|
||||||
|
unset($all_args->xe_validator_id);
|
||||||
unset($all_args->module);
|
unset($all_args->module);
|
||||||
unset($all_args->act);
|
unset($all_args->act);
|
||||||
unset($all_args->is_admin);
|
unset($all_args->is_admin);
|
||||||
|
|
@ -671,15 +683,19 @@ class memberController extends member
|
||||||
unset($all_args->password);
|
unset($all_args->password);
|
||||||
unset($all_args->password2);
|
unset($all_args->password2);
|
||||||
unset($all_args->mid);
|
unset($all_args->mid);
|
||||||
|
unset($all_args->success_return_url);
|
||||||
unset($all_args->error_return_url);
|
unset($all_args->error_return_url);
|
||||||
unset($all_args->ruleset);
|
unset($all_args->ruleset);
|
||||||
unset($all_args->captchaType);
|
unset($all_args->captchaType);
|
||||||
unset($all_args->secret_text);
|
unset($all_args->secret_text);
|
||||||
|
unset($all_args->use_editor);
|
||||||
|
unset($all_args->use_html);
|
||||||
|
|
||||||
// Set the user state as "denied" when using mail authentication
|
// Set the user state as "denied" when using mail authentication
|
||||||
if($config->enable_confirm == 'Y') $args->denied = 'Y';
|
if($config->enable_confirm == 'Y') $args->denied = 'Y';
|
||||||
// Add extra vars after excluding necessary information from all the requested arguments
|
// Add extra vars after excluding necessary information from all the requested arguments
|
||||||
$extra_vars = delObjectVars($all_args, $args);
|
$extra_vars = delObjectVars($all_args, $args);
|
||||||
|
$extra_vars->accept_agreement = $accept_agreement_rearranged;
|
||||||
$args->extra_vars = serialize($extra_vars);
|
$args->extra_vars = serialize($extra_vars);
|
||||||
|
|
||||||
// remove whitespace
|
// remove whitespace
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue