Add option to use a specific string in the URL to bypass disabled signup page

회원 가입을 닫아놓은 상태에서는 관리자도 회원 가입 기능을 테스트할 수 없는
문제를 해소하기 위해, 관리자가 설정한 특정한 문자열을 URL에 포함할 경우
회원 가입 페이지에 접근할 수 있도록 허용하는 옵션 추가
This commit is contained in:
Kijin Sung 2022-10-11 22:19:32 +09:00
parent 24f49d441e
commit 81882e8420
7 changed files with 56 additions and 6 deletions

View file

@ -625,9 +625,12 @@ class memberController extends member
if(!$trigger_output->toBool ()) return $trigger_output;
// Check if an administrator allows a membership
if($config->enable_join !== 'Y' || !$config->signupForm)
if ($config->enable_join !== 'Y' || !$config->signupForm)
{
throw new Rhymix\Framework\Exceptions\FeatureDisabled('msg_signup_disabled');
if (empty($config->enable_join_key) || !isset($_SESSION['signup_allowed']) || !$_SESSION['signup_allowed'])
{
throw new Rhymix\Framework\Exceptions\FeatureDisabled('msg_signup_disabled');
}
}
// Check if the user accept the license terms (only if terms exist)