extend switch_to_url()
-
Hi,
if one switches to a buddypress-user the redirect to the home is not quite perfect. There might be different opinions there, but for our customer redirecting to the user profile made the most sense.
So I’ve changed this:
public static function switch_to_url( $user_id ) { if(function_exists('bp_core_get_user_domain')) { $redirect_to = bp_core_get_user_domain( $user_id ); } return wp_nonce_url( add_query_arg( array( 'action' => 'switch_to_user', 'user_id' => $user_id, 'redirect_to' => urlencode( $redirect_to ), ), wp_login_url() ), "switch_to_user_{$user_id}" ); }
Maybe you can add a nice hook there…
thanks
Klaus
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘extend switch_to_url()’ is closed to new replies.