Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/22/2012 07:40:14 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Update 'mode' to default to 2 in bp_core_no_access().

  • Reverts part of r6402.
  • Forces user to the login page with a smart redirect.
  • Under most circumstances this is the desired result. Places where it's not can pass a new mode.
  • bp_core_no_access() deserves an audit, to make sure it's being used correctly. I.E. using it in bp_core_add_subnav_item() seems too early in the stack; we should be catching this in template_redirect.
File:
1 edited

Legend:

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

    r6404 r6444  
    459459
    460460    $defaults = array(
    461         'mode'     => bp_is_theme_bp_default() ? 1 : 2, // 1 = $root, 2 = wp-login.php
    462         'redirect' => $redirect_url,                    // the URL you get redirected to when a user successfully logs in
    463         'root'     => bp_get_root_domain(),         // the landing page you get redirected to when a user doesn't have access
     461        'mode'     => 2,                    // 1 = $root, 2 = wp-login.php
     462        'redirect' => $redirect_url,        // the URL you get redirected to when a user successfully logs in
     463        'root'     => bp_get_root_domain(), // the landing page you get redirected to when a user doesn't have access
    464464        'message'  => __( 'You must log in to access the page you requested.', 'buddypress' )
    465465    );
Note: See TracChangeset for help on using the changeset viewer.