Changeset 9400 for trunk/src/bp-members/bp-members-screens.php
- Timestamp:
- 01/22/2015 09:44:36 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/bp-members/bp-members-screens.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/bp-members-screens.php
r9351 r9400 290 290 /** 291 291 * Handle the loading of the Activate screen. 292 * 293 * @todo Move the actual activation process into an action in bp-members-actions.php 292 294 */ 293 295 function bp_core_screen_activation() { 294 global $bp;295 296 if ( ! bp_is_current_component( 'activate' ) )296 297 // Bail if not viewing the activation page 298 if ( ! bp_is_current_component( 'activate' ) ) { 297 299 return false; 298 299 // If the user is logged in, redirect away from here 300 } 301 302 // If the user is already logged in, redirect away from here 300 303 if ( is_user_logged_in() ) { 301 if ( bp_is_component_front_page( 'activate' ) ) { 302 $redirect_to = trailingslashit( bp_get_root_domain() . '/' . bp_get_members_root_slug() ); 303 } else { 304 $redirect_to = trailingslashit( bp_get_root_domain() ); 305 } 304 305 // If activation page is also front page, set to members directory to 306 // avoid an infinite loop. Otherwise, set to root domain. 307 $redirect_to = bp_is_component_front_page( 'activate' ) 308 ? bp_get_root_domain() . '/' . bp_get_members_root_slug() 309 : bp_get_root_domain(); 310 311 // Trailing slash it, as we expect these URL's to be 312 $redirect_to = trailingslashit( $redirect_to ); 306 313 307 314 /** … … 312 319 * @param string $redirect_to URL to redirect user to. 313 320 */ 314 bp_core_redirect( apply_filters( 'bp_loggedin_activate_page_redirect_to', $redirect_to ) ); 315 316 return; 321 $redirect_to = apply_filters( 'bp_loggedin_activate_page_redirect_to', $redirect_to ); 322 323 // Redirect away from the activation page 324 bp_core_redirect( $redirect_to ); 317 325 } 318 326 … … 324 332 $key = bp_current_action(); 325 333 } 334 335 // Get BuddyPress 336 $bp = buddypress(); 326 337 327 338 // we've got a key; let's attempt to activate the signup
Note: See TracChangeset
for help on using the changeset viewer.