diff -r 9aa09b0a7544 -r db42b7c50e57 plugins/SpecialUserFuncs.php --- a/plugins/SpecialUserFuncs.php Sat Apr 17 03:33:14 2010 -0400 +++ b/plugins/SpecialUserFuncs.php Mon Apr 19 18:07:43 2010 -0400 @@ -549,6 +549,7 @@ global $db, $session, $paths, $template, $plugins; // Common objects global $lang; + // block registration except for guests and admins if ( $session->user_level < USER_LEVEL_ADMIN && $session->user_logged_in ) { $paths->main_page(); @@ -561,10 +562,9 @@ $terms = getConfig('register_tou'); - if(getConfig('account_activation') == 'disable' && ( ( $session->user_level >= USER_LEVEL_ADMIN && !isset($_GET['IWannaPlayToo']) ) || $session->user_level < USER_LEVEL_ADMIN || !$session->user_logged_in )) + if ( getConfig('account_activation') == 'disable' && $session->user_level < USER_LEVEL_ADMIN ) { - $s = ($session->user_level >= USER_LEVEL_ADMIN) ? '
' . $lang->get('user_reg_err_disabled_body_adminblurb', array( 'reg_link' => makeUrl($paths->page, 'IWannaPlayToo&coppa=no', true) )) . '
' : ''; - die_friendly($lang->get('user_reg_err_disabled_title'), '' . $lang->get('user_reg_err_disabled_body') . '
' . $s); + die_friendly($lang->get('user_reg_err_disabled_title'), '' . $lang->get('user_reg_err_disabled_body') . '
'); } // are we locked out from logging in? if so, also lock out registration if ( getConfig('lockout_policy') === 'lockout' ) @@ -588,8 +588,11 @@ { $_GET['coppa'] = ( isset($_POST['coppa']) ) ? $_POST['coppa'] : 'x'; - $captcharesult = $session->get_captcha($_POST['captchahash']); - $session->kill_captcha(); + if ( $session->user_level < USER_LEVEL_ADMIN ) + { + $captcharesult = $session->get_captcha($_POST['captchahash']); + $session->kill_captcha(); + } // bypass captcha if logged in (at this point, if logged in, we're admin) if ( !$session->user_logged_in && strtolower($captcharesult) != strtolower($_POST['captchacode']) ) { @@ -683,6 +686,11 @@ $template->header(); echo $lang->get('user_reg_msg_greatercontrol'); + if ( getConfig('account_activation') == 'disable' && $session->user_level >= USER_LEVEL_ADMIN ) + { + echo '