summaryrefslogtreecommitdiffstats
path: root/wp-signup.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-10-04 15:07:51 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-10-04 15:07:51 +0000
commit3cc1e1170928773f76aad938f37fd07539206c05 (patch)
tree74fc054011f662fc06d1f1b9d106813f1aca1451 /wp-signup.php
parentf4b9932ffd83269edcd5270b20f4a2aa3f692304 (diff)
downloadwordpress-mu-3cc1e1170928773f76aad938f37fd07539206c05.tar.gz
wordpress-mu-3cc1e1170928773f76aad938f37fd07539206c05.tar.xz
wordpress-mu-3cc1e1170928773f76aad938f37fd07539206c05.zip
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
Diffstat (limited to 'wp-signup.php')
-rw-r--r--wp-signup.php7
1 files changed, 6 insertions, 1 deletions
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!" );
}