Skip to:
Content

BuddyPress.org

Changeset 6034


Ignore:
Timestamp:
05/14/2012 04:06:01 PM (12 years ago)
Author:
boonebgorges
Message:

Use the passed redirect_to value for checks in bp_core_login_redirect() instead of REQUEST global

The redirect_to value passed to the login_redirect filter in wp-login.php is a
cleaned up version of _REQUESTredirect_to?, and is a more reliable indicator
of where the link is trying to send the user. So it's a good idea to use it
when checking for the presence of 'wp-admin' rather than referencing the
global directly.

See #4199

File:
1 edited

Legend:

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

    r6031 r6034  
    147147    // logged-in user has any business to conduct in the Dashboard before allowing the
    148148    // redirect to go through
    149     if ( !empty( $_REQUEST['redirect_to'] ) && ( false === strpos( $_REQUEST['redirect_to'], 'wp-admin' ) || user_can( $user, 'edit_posts' ) ) ) {
     149    if ( !empty( $redirect_to ) && ( false === strpos( $redirect_to, 'wp-admin' ) || user_can( $user, 'edit_posts' ) ) ) {
    150150        return $redirect_to;
    151151    }
Note: See TracChangeset for help on using the changeset viewer.