summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-12-04 12:56:45 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2007-12-04 12:56:45 +0000
commitf51c215c20a3b5be1a5f6c1982f7b8f03358d092 (patch)
treefa10700ad3611c15c6c5bf0e9a66d7bad254cb38
parentb2a5e96cf763d91fcebad322c64b2df8bab49b48 (diff)
downloadwordpress-mu-f51c215c20a3b5be1a5f6c1982f7b8f03358d092.tar.gz
wordpress-mu-f51c215c20a3b5be1a5f6c1982f7b8f03358d092.tar.xz
wordpress-mu-f51c215c20a3b5be1a5f6c1982f7b8f03358d092.zip
Check that user is logged in
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1165 7be80a69-a1ef-0310-a953-fb0f7c49ff36
-rw-r--r--wp-signup.php8
1 files changed, 6 insertions, 2 deletions
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(__("<p><em>The blog you were looking for, <strong>%s</strong> doesn't exist but you can create it now!</em></p>"), $newblog );
}
break;
-}
+ }
}
?>
</div>