Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/22/2012 08:01:56 AM (12 years ago)
Author:
johnjamesjacoby
Message:

Use bp_has_custom_signup_page() in bp_core_wpsignup_redirect() to prevent infinite redirect loops.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-members/bp-members-functions.php

    r6399 r6449  
    13871387 */
    13881388function bp_core_wpsignup_redirect() {
     1389
     1390    // Bail in admin or if custom signup page is broken
     1391    if ( is_admin() || ! bp_has_custom_signup_page() )
     1392        return;
     1393
    13891394    $action = !empty( $_GET['action'] ) ? $_GET['action'] : '';
    1390 
    1391     if ( is_admin() || is_network_admin() )
    1392         return;
    13931395
    13941396    // Not at the WP core signup page and action is not register
     
    13961398        return;
    13971399
    1398     // Redirect to sign-up page if a custom signup page exists
    1399     if ( bp_has_custom_signup_page() )
    1400         bp_core_redirect( bp_get_signup_page() );
     1400    bp_core_redirect( bp_get_signup_page() );
    14011401}
    14021402add_action( 'bp_init', 'bp_core_wpsignup_redirect' );
Note: See TracChangeset for help on using the changeset viewer.