diff -r e5484a9e0818 -r 7e8fd44b36b0 plugins/SpecialUserFuncs.php --- a/plugins/SpecialUserFuncs.php Thu Jun 28 11:13:39 2007 -0400 +++ b/plugins/SpecialUserFuncs.php Thu Jun 28 13:49:40 2007 -0400 @@ -300,21 +300,38 @@ $template->footer(); } -function page_Special_Register() { +function page_Special_Register() +{ global $db, $session, $paths, $template, $plugins; // Common objects if(getConfig('account_activation') == 'disable' && ( ( $session->user_level >= USER_LEVEL_ADMIN && !isset($_GET['IWannaPlayToo']) ) || $session->user_level < USER_LEVEL_ADMIN || !$session->user_logged_in )) { $s = ($session->user_level >= USER_LEVEL_ADMIN) ? '
Oops...it seems that you are the administrator...hehe...you can also force account registration to work.
' : ''; die_friendly('Registration disabled', 'The administrator has disabled new user registration on this site.
' . $s); } - if(isset($_POST['submit'])) { + if(isset($_POST['submit'])) + { + $_GET['coppa'] = ( isset($_POST['coppa']) ) ? $_POST['coppa'] : 'x'; + $captcharesult = $session->get_captcha($_POST['captchahash']); if($captcharesult != $_POST['captchacode']) + { $s = 'The confirmation code you entered was incorrect.'; + } else - // CAPTCHA code was correct, create the account - $s = $session->create_user($_POST['username'], $_POST['password'], $_POST['email'], $_POST['real_name']); - if($s == 'success') + { + if ( getConfig('enable_coppa') == '1' && ( !isset($_POST['coppa']) || ( isset($_POST['coppa']) && !in_array($_POST['coppa'], array('yes', 'no')) ) ) ) + { + $s = 'Invalid COPPA input'; + } + else + { + $coppa = ( isset($_POST['coppa']) && $_POST['coppa'] == 'yes' ); + + // CAPTCHA code was correct, create the account + $s = $session->create_user($_POST['username'], $_POST['password'], $_POST['email'], $_POST['real_name'], $coppa); + } + } + if($s == 'success' && !isset($coppa)) { switch(getConfig('account_activation')) { @@ -331,132 +348,174 @@ } die_friendly('Registration successful', 'Thank you for registering, your user account has been created. '.$str.'
'); } + else if ( $s == 'success' && $coppa ) + { + $str = 'However, in compliance with the Childrens\' Online Privacy Protection Act, you must have your parent or legal guardian activate your account. Please ask them to check their e-mail for further information.'; + die_friendly('Registration successful', 'Thank you for registering, your user account has been created. '.$str.'
'); + } } $template->header(); echo 'A user account enables you to have greater control over your browsing experience.'; - $session->kill_captcha(); - $captchacode = $session->make_captcha(); - ?> -+ Before you can register, please tell us your age. + | +
+ I was born on or before ' . $yo13_date . ' and am at least 13 years of age + I was born after ' . $yo13_date . ' and am less than 13 years of age + |
+