Changeset 5767
- Timestamp:
- 02/13/2012 09:16:47 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-catchuri.php
r5760 r5767 439 439 function bp_core_no_access( $args = '' ) { 440 440 441 // Build the redirect URL 442 $redirect_url = is_ssl() ? 'https://' : 'http://'; 443 $redirect_url .= $_SERVER['HTTP_HOST']; 444 $redirect_url .= $_SERVER['REQUEST_URI']; 445 441 446 $defaults = array( 442 'mode' => '1', 443 ' message' => __( 'You must log in to access the page you requested.', 'buddypress' ),444 'r edirect' => wp_guess_url(), // the URL you get redirected to when a user successfully logs in445 ' root' => bp_get_root_domain() // the landing page you get redirected to when a user doesn't have access447 'mode' => '1', // 1 = $root, 2 = wp-login.php 448 'redirect' => $redirect_url, // the URL you get redirected to when a user successfully logs in 449 'root' => bp_get_root_domain(), // the landing page you get redirected to when a user doesn't have access 450 'message' => __( 'You must log in to access the page you requested.', 'buddypress' ) 446 451 ); 447 452 … … 460 465 461 466 switch ( $mode ) { 467 462 468 // Option to redirect to wp-login.php 463 469 // Error message is displayed with bp_core_no_access_wp_login_error() 464 470 case 2 : 465 if ( $redirect) {466 bp_core_redirect( wp_login_url( $redirect ) . '&action=bpnoaccess');471 if ( !empty( $redirect ) ) { 472 bp_core_redirect( add_query_arg( array( 'action' => 'bpnoaccess' ), wp_login_url( $redirect ) ) ); 467 473 } else { 468 474 bp_core_redirect( $root );
Note: See TracChangeset
for help on using the changeset viewer.