Add multiple member agreements

- 가입 약관, 개인정보처리방침 등을 5개까지 추가할 수 있음
- 약관마다 각각 필수 또는 선택을 지정할 수 있음
- 모든 필수 약관에 동의해야 가입 가능
- 기본 스킨은 수정함. 서드파티 스킨에는 여전히 약관 1개만 표시됨
- 서드파티 스킨 사용시 동의 하나만 선택해도 전체 동의로 간주
This commit is contained in:
Kijin Sung 2017-11-27 14:43:20 +09:00
parent 20f924678a
commit 11c04c5a26
19 changed files with 251 additions and 72 deletions

View file

@ -583,8 +583,16 @@ class memberController extends member
if(!$trigger_output->toBool ()) return $trigger_output;
// Check if an administrator allows a membership
if($config->enable_join != 'Y') return $this->stop ('msg_signup_disabled');
// Check if the user accept the license terms (only if terms exist)
if($config->agreement && Context::get('accept_agreement')!='Y') return $this->stop('msg_accept_agreement');
$accept_agreement = Context::get('accept_agreement');
foreach($config->agreements as $i => $agreement)
{
if($agreement->type === 'required' && $accept_agreement !== 'Y' && $accept_agreement[$i] !== 'Y')
{
return $this->stop('msg_accept_agreement');
}
}
// Extract the necessary information in advance
$getVars = array();