Changeset 4088 for trunk/bp-members/bp-members-signup.php
- Timestamp:
- 03/08/2011 06:35:03 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-members/bp-members-signup.php
r4056 r4088 1 1 <?php 2 3 /** 4 * BuddyPress Member Sign-up 5 * 6 * Functions and filters specific to the member sign-up process 7 * 8 * @package BuddyPress 9 * @subpackage Members 10 */ 2 11 3 12 … … 5 14 global $bp, $wpdb; 6 15 7 if ( $bp->current_component != BP_REGISTER_SLUG ) 8 return false; 9 10 $bp->is_directory = false; 16 if ( !bp_is_current_component( 'register' ) ) 17 return false; 18 19 // Not a directory 20 bp_update_is_directory( false, 'register' ); 11 21 12 22 if ( bp_is_component_front_page( 'register' ) && ( is_user_logged_in() || !bp_get_signup_allowed() ) ) 13 bp_core_redirect( bp_get_root_domain() . '/' . $bp->members->slug);23 bp_core_redirect( bp_get_root_domain() . '/' . bp_get_members_root_slug() ); 14 24 15 25 // If the user is logged in, redirect away from here … … 155 165 global $bp, $wpdb; 156 166 157 if ( BP_ACTIVATION_SLUG != $bp->current_component)167 if ( bp_is_current_component( 'activate' ) ) 158 168 return false; 159 169 … … 167 177 if ( !empty( $user->errors ) ) { 168 178 bp_core_add_message( $user->get_error_message(), 'error' ); 169 bp_core_redirect( bp_get_root_domain() . '/' . BP_ACTIVATION_SLUG);179 bp_core_redirect( trailingslashit( bp_get_root_domain() . '/' . $bp->pages->activate->slug ) ); 170 180 } 171 181 … … 593 603 // Kill the wp-signup.php if custom registration signup templates are present 594 604 function bp_members_wpsignup_redirect() { 605 global $bp; 606 595 607 $action = ''; 596 608 if ( isset( $_GET['action'] ) ) … … 601 613 602 614 if ( locate_template( array( 'registration/register.php' ), false ) || locate_template( array( 'register.php' ), false ) ) 603 bp_core_redirect( bp_get_root_domain() . '/' . BP_REGISTER_SLUG. '/' );615 bp_core_redirect( bp_get_root_domain() . '/' . $bp->pages->register->slug . '/' ); 604 616 } 605 617 if ( is_multisite() )
Note: See TracChangeset
for help on using the changeset viewer.