Changeset 1655 for trunk/bp-core/bp-core-signup.php
- Timestamp:
- 08/13/2009 01:24:21 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/bp-core/bp-core-signup.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-signup.php
r1636 r1655 14 14 if ( function_exists('wp_insert_user') ) 15 15 return false; 16 16 17 /* If signups are disabled, just re-direct */ 18 if ( 'none' == bp_get_signup_allowed() || 'blog' == bp_get_signup_allowed() ) 19 bp_core_redirect( $bp->root_domain ); 20 17 21 $bp->signup->step = 'request-details'; 18 22 … … 22 26 /* Check the nonce */ 23 27 check_admin_referer( 'bp_new_signup' ); 24 28 25 29 require_once( ABSPATH . WPINC . '/registration.php' ); 26 30 … … 101 105 } 102 106 107 /* Store the profile field ID's in usermeta */ 108 $usermeta['profile_field_ids'] = $_POST['signup_profile_field_ids']; 109 103 110 /* Hash and store the password */ 104 111 $usermeta['password'] = wp_hash_password( $_POST['signup_password'] ); … … 112 119 113 120 $usermeta = apply_filters( 'bp_signup_usermeta', $usermeta ); 114 115 /* Finally, sign up the user */ 116 wpmu_signup_user( $_POST['signup_username'], $_POST['signup_email'], $usermeta ); 121 122 /* Finally, sign up the user and/or blog*/ 123 if ( isset( $_POST['signup_with_blog'] ) ) 124 wpmu_signup_blog( $blog_details['domain'], $blog_details['path'], $blog_details['blog_title'], $_POST['signup_username'], $_POST['signup_email'], $usermeta ); 125 else 126 wpmu_signup_user( $_POST['signup_username'], $_POST['signup_email'], $usermeta ); 117 127 118 128 $bp->signup->step = 'completed-confirmation'; … … 168 178 169 179 } 170 171 bp_core_load_template( 'register' ); 180 bp_core_load_template( 'registration/register' ); 172 181 } 173 182 add_action( 'wp', 'bp_core_screen_signup', 3 ); … … 195 204 } 196 205 206 /* Kill the wp-signup.php if custom registration signup templates are present */ 207 function bp_core_wpsignup_redirect() { 208 if ( false === strpos( $_SERVER['SCRIPT_NAME'], 'wp-signup.php') ) 209 return false; 210 211 if ( file_exists( TEMPLATEPATH . '/registration/register.php' ) || file_exists( TEMPLATEPATH . '/register.php' ) ) 212 die; 213 } 214 add_action( 'signup_header', 'bp_core_wpsignup_redirect' ); 215 197 216 198 217
Note: See TracChangeset
for help on using the changeset viewer.