Skip to:
Content

BuddyPress.org

Ticket #3976: 3976.01.patch

File 3976.01.patch, 1.1 KB (added by r-a-y, 13 years ago)
  • bp-core/bp-core-catchuri.php

     
    439439 */
    440440function bp_core_no_access( $args = '' ) {
    441441
     442        // build the redirect URL
     443        $redirect_url  = is_ssl() ? 'https://' : 'http://';
     444        $redirect_url .= $_SERVER['HTTP_HOST'];
     445        $redirect_url .= $_SERVER['REQUEST_URI'];
     446
    442447        $defaults = array(
    443                 'mode'     => '1',                          // 1 = $root, 2 = wp-login.php
     448                'mode'     => '1',                 // 1 = $root, 2 = wp-login.php
    444449                'message'  => __( 'You must log in to access the page you requested.', 'buddypress' ),
    445                 'redirect' => wp_guess_url(),   // the URL you get redirected to when a user successfully logs in
    446                 'root'     => bp_get_root_domain()      // the landing page you get redirected to when a user doesn't have access
     450                'redirect' => $redirect_url,       // the URL you get redirected to when a user successfully logs in
     451                'root'     => bp_get_root_domain() // the landing page you get redirected to when a user doesn't have access
    447452        );
    448453
    449454        $r = wp_parse_args( $args, $defaults );