From 3cc1e1170928773f76aad938f37fd07539206c05 Mon Sep 17 00:00:00 2001 From: donncha Date: Thu, 4 Oct 2007 15:07:51 +0000 Subject: Add registration disable/enable radio controls to wpmu-options page git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1062 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-signup.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'wp-signup.php') diff --git a/wp-signup.php b/wp-signup.php index 9798703..f243c02 100644 --- a/wp-signup.php +++ b/wp-signup.php @@ -367,7 +367,10 @@ function confirm_blog_signup($domain, $path, $blog_title, $user_name, $user_emai } // Main -$active_signup = 'all'; +$active_signup = get_site_option( 'registration' ); +if( !$active_signup ) + $active_signup = 'all'; + $active_signup = apply_filters( 'wpmu_active_signup', $active_signup ); // return "all", "none", "blog" or "user" $newblogname = isset($_GET['new']) ? strtolower(preg_replace('/^-|-$|[^-a-zA-Z0-9]/', '', $_GET['new'])) : null; @@ -400,6 +403,8 @@ switch ($_POST['stage']) { signup_another_blog($newblogname); } elseif( is_user_logged_in() == false && ( $active_signup == 'all' || $active_signup == 'user' ) ) { signup_user( $newblogname, $user_email ); + } elseif( is_user_logged_in() == false && ( $active_signup == 'blog' ) ) { + _e( "I'm sorry. We're not accepting new registrations at this time." ); } else { _e( "You're logged in already. No need to register again!" ); } -- cgit