Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/26/2014 02:31:53 PM (10 years ago)
Author:
boonebgorges
Message:

Ensure site_options have been loaded in bp_get_signup_allowed().

This function is sometimes run before $bp->site_options has been populated,
resulting in incorrect 'registration' values.

Fixes #6043.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-members/bp-members-template.php

    r9096 r9189  
    18021802     */
    18031803    function bp_get_signup_allowed() {
    1804         global $bp;
     1804        $bp = buddypress();
    18051805
    18061806        $signup_allowed = false;
    18071807
    18081808        if ( is_multisite() ) {
     1809            if ( ! isset( $bp->site_options ) ) {
     1810                $bp->site_options = bp_core_get_root_options();
     1811            }
     1812
    18091813            if ( in_array( $bp->site_options['registration'], array( 'all', 'user' ) ) ) {
    18101814                $signup_allowed = true;
Note: See TracChangeset for help on using the changeset viewer.