Redirect issue – bp-core-catchuri.php
-
Hello,
I’m using DAP as a membership plugin and it synchs to WP, so I never want the users of the site to see wp-login. I’m having a problem with the notifications emails BP sends out. For instance, on a friend request, the email will list http://www.website.com/username/settings/notifications. If a user is not logged in they will be redirected to wp-login which I don’t want. I need them to redirect to my custom login page http://www.website.com/login.
I believe I traced it back to bp-core-catchuri.php, but my php knowledge is falling a bit short.
I tried to modify the code to the following but it didn’t work, I’m just trying to redirect the bpnoaccess to my custom page:
case 2 :
if ( !empty( $redirect ) ) {
bp_core_redirect( add_query_arg( array( ‘action’ => ‘bpnoaccess’ ), wp_login_url( $redirect ) ) );
} else {
bp_core_redirect( “http://YourSite.com/login/” );
}There’s also this code, which I may have to change…ugh.
$url = $root;
if ( !empty( $redirect ) )
$url = add_query_arg( ‘redirect_to’, urlencode( $redirect ), $root );if ( !empty( $message ) ) {
bp_core_add_message( $message, ‘error’ );
}bp_core_redirect( $url );
Am I way off base here? Can someone with more knowledge help me out? Thanks so much!
- The topic ‘Redirect issue – bp-core-catchuri.php’ is closed to new replies.