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(); - ?> -

Create a user account

-
-
- - - '; ?> - - - - '; ?> - - - - -
Please tell us a little bit about yourself.
'.$s.'
Preferred username:Good/bad icon
Password:Good/bad icon
Enter your password again to confirm.
E-mail address:An e-mail with an account activation key will be sent to this address, so please ensure that it is correct.Good/bad icon
Real name:
Giving your real name is totally optional. If you choose to provide your real name, it will be used to provide attribution for any edits or contributions you may make to this site.
Visual confirmation
Please enter the code shown in the image to the right into the text box. This process helps to ensure that this registration is not being performed by an automated bot. If the image to the right is illegible, you can generate a new image.

If you are visually impaired or otherwise cannot read the text shown to the right, please contact the site management and they will create an account for you.
CAPTCHA image
Code:
-
-
- - + + '; + echo ''; + echo ' + + + + + '; + echo '
+ 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 +
'; + echo ''; + } $template->footer(); }