Skip to:
Content

BuddyPress.org

Changeset 4898


Ignore:
Timestamp:
07/29/2011 09:39:28 PM (13 years ago)
Author:
boonebgorges
Message:

Ensures that bp_core_login_redirect() successfully directs users away from wp-admin. Fixes #2073. Props francescolaffi

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-filters.php

    r4820 r4898  
    129129    global $bp, $wpdb;
    130130
     131    // Don't mess with the redirect if this is not the root blog
    131132    if ( is_multisite() && $wpdb->blogid != bp_get_root_blog_id() )
    132133        return $redirect_to;
    133134
    134     if ( isset( $_REQUEST['redirect_to'] ) && ( !empty( $_REQUEST['redirect_to'] ) || strpos( $_REQUEST['redirect_to'], 'wp-admin' ) ) )
     135    // If the redirect doesn't contain 'wp-admin', it's OK
     136    if ( isset( $_REQUEST['redirect_to'] ) && false === strpos( $_REQUEST['redirect_to'], 'wp-admin' ) )
    135137        return $redirect_to;
    136138
Note: See TracChangeset for help on using the changeset viewer.