From 41c576d1bdf02cb82aafcdeeaf3481f736a54ecf Mon Sep 17 00:00:00 2001 From: donncha Date: Tue, 20 Mar 2007 18:20:36 +0000 Subject: Minor html changes added signup_extra_fields action remember "signup for" status $blog_id shouldn't be used globally as a string git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@925 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-signup.php | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) (limited to 'wp-signup.php') diff --git a/wp-signup.php b/wp-signup.php index 1180d7a..bc26e96 100644 --- a/wp-signup.php +++ b/wp-signup.php @@ -78,7 +78,7 @@ function show_blog_form($blog_id = '', $blog_title = '', $errors = '') { '; } -?>get_error_message('user_email') ) { ?>

get_error_message('generic') ) print ' '.$errmsg.' '; + do_action( 'signup_extra_fields' ); } function validate_user_form() { @@ -212,6 +213,11 @@ function signup_user($user_name = '', $user_email = '', $errors = '') { if ( ! is_wp_error($errors) ) $errors = new WP_Error(); + if( isset( $_POST[ 'signup_for' ] ) ) { + $signup[ wp_specialchars( $_POST[ 'signup_for' ] ) ] = 'checked'; + } else { + $signup[ 'blog' ] = 'checked'; + } // allow definition of default variables $filtered_results = apply_filters('signup_user_init', array('user_name' => $user_name, 'user_email' => $user_email, 'errors' => $errors )); @@ -224,15 +230,15 @@ function signup_user($user_name = '', $user_email = '', $errors = '') {
- +
@@ -261,7 +267,7 @@ function validate_user_signup() { return; } - wpmu_signup_user($user_name, $user_email); + wpmu_signup_user($user_name, $user_email, apply_filters( "add_signup_meta", array() ) ); confirm_user_signup($user_name, $user_email); } @@ -348,7 +354,7 @@ if( in_array( $_GET[ 'new' ], get_site_option( 'illegal_names' ) ) == true ) { header( "Location: http://{$current_site->domain}{$current_site->path}" ); die(); } -$blog_id = isset($_GET['new']) ? strtolower(preg_replace('/^-|-$|[^-a-zA-Z0-9]/', '', $_GET['new'])) : null; +$newblogname = isset($_GET['new']) ? strtolower(preg_replace('/^-|-$|[^-a-zA-Z0-9]/', '', $_GET['new'])) : null; if( $_POST['blog_public'] != 1 ) $_POST['blog_public'] = 0; @@ -366,15 +372,15 @@ switch ($_POST['stage']) { $user_email = $_POST[ 'user_email' ]; do_action( "preprocess_signup_form" ); // populate the form from invites, elsewhere? if ( is_user_logged_in() ) - signup_another_blog($blog_id); + signup_another_blog($newblogname); else - signup_user( $blog_id, $user_email ); + signup_user( $newblogname, $user_email ); - if ($blog_id) { + if ($newblogname) { if( constant( "VHOST" ) == 'no' ) - $newblog = 'http://' . $current_site->domain . $current_site->path . $blog_id . '/'; + $newblog = 'http://' . $current_site->domain . $current_site->path . $newblogname . '/'; else - $newblog = 'http://' . $blog_id . '.' . $current_site->domain . $current_site->path; + $newblog = 'http://' . $newblogname . '.' . $current_site->domain . $current_site->path; printf(__("

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

"), $newblog ); } break; -- cgit
 

- + />
- + />