From f51c215c20a3b5be1a5f6c1982f7b8f03358d092 Mon Sep 17 00:00:00 2001 From: donncha Date: Tue, 4 Dec 2007 12:56:45 +0000 Subject: Check that user is logged in git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1165 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-signup.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'wp-signup.php') diff --git a/wp-signup.php b/wp-signup.php index 8b7b49f..e643623 100644 --- a/wp-signup.php +++ b/wp-signup.php @@ -391,10 +391,14 @@ if( is_site_admin() ) { $newblogname = isset($_GET['new']) ? strtolower(preg_replace('/^-|-$|[^-a-zA-Z0-9]/', '', $_GET['new'])) : null; +$current_user = wp_get_current_user(); if( $active_signup == "none" ) { _e( "Registration has been disabled." ); } else { -switch ($_POST['stage']) { + if( $active_signup == 'blog' && !is_user_logged_in() ) { + wp_die( 'You must be logged in to register a blog.' ); + } + switch ($_POST['stage']) { case 'validate-user-signup' : if( $active_signup == 'all' || $_POST[ 'signup_for' ] == 'blog' && $active_signup == 'blog' || $_POST[ 'signup_for' ] == 'user' && $active_signup == 'user' ) validate_user_signup(); @@ -431,7 +435,7 @@ switch ($_POST['stage']) { printf(__("

The blog you were looking for, %s doesn't exist but you can create it now!

"), $newblog ); } break; -} + } } ?> -- cgit