Show Sidebar Log in
Commons In A Box Logo
  • Home
  • About
    • Project Team
    • Logos and Graphics
  • Showcase
    • CBOX Classic Showcase
    • CBOX OpenLab Showcase
  • Demo
  • Get Started
  • Documentation
    • Technical Guide
    • CBOX Classic Guide
    • CBOX OpenLab Guide
  • Support Forums
    • CBOX Classic
    • CBOX OpenLab
    • Developers Forum
  • News

Group Admins

  • Profile picture of Scott Voth

CBOX Classic Support

Public Group active 4 months ago

This group provides support for Commons In A Box Classic, our original software for community-building. Register for an account or log in to commonsinabox.org, then join the group and post your question here.

Invite Anyone: "User registration is currently not allowed" error

Tagged: 1.0.4, error, invite anyone, Registration

  • This topic has 6 replies, 2 voices, and was last updated 11 years, 9 months ago by Ray.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • May 28, 2013 at 9:26 pm #2805
    Daniel Jones
    Participant

    Hello all,

    So I had this problem a while back, but one of the early updates fixed it…it seems that it’s back with the 1.0.4 release (sorry this one seems to be causing people some trouble! Growing pains are usually worth it in the end though).

    I think all of the relevant settings are set to default, and I’m pretty sure I haven’t changed any between when IA was working and now. User registration is disabled on the site, but IA is set to bypass that when someone gets an invite email. However, a number of different users are getting the “User registration is currently not allowed” page when they click their invite link.

    Any thoughts on what could be causing this?
    Dan

    May 31, 2013 at 6:16 pm #2816
    Daniel Jones
    Participant

    Turning on debugging brings up the following error: “Notice: Indirect modification of overloaded property BuddyPress::$site_options has no effect in /nas/wp/www/staging/upoor/wp-content/plugins/invite-anyone/by-email/by-email.php on line 1246”

    It seems like this is line that’s causing trouble:

    else if ( !empty( $bp->site_options[‘registration’] ) && $bp->site_options[‘registration’] == ‘none’ ) {
    $bp->site_options[‘registration’] = ‘user’;
    }

    A dump of the $bp global show that site_options[‘registration’] is in fact set to none. Anyone have thoughts on what I could try next? Can’t seem to pass “$bp->site_options[‘registration’]” by reference, which is probably a good thing.

    June 1, 2013 at 4:29 pm #2819
    Ray
    Keymaster

    I just tried to duplicate this, but am unable to.

    I turned off registration on my single WP site and then proceeded to send an invite.  The dummy email received the invite and I was able to click on the registration link successfully.

    Are you testing this on multisite or single site?

    June 1, 2013 at 9:27 pm #2820
    Daniel Jones
    Participant

    Darn I was afraid that might be the case!

    I’m using multisite. I tried switching from my child theme back to the default and still got the same error, and also tried disabling the plugins that seemed relevant/that I had installed after the last successful registration.

    June 2, 2013 at 11:28 pm #2828
    Daniel Jones
    Participant

    Sorry to double-post (again).

    I’m totally stumped. I’ve disabled every plug-in except for Commons in a Box, deleted Commons in a Box and all of the plugins it comes with and the CBOX theme, and then re-installed Commons in a Box and the theme, and am still getting the same error.

    Does anyone have an idea of even where the culprit could be? Seems like it would have to be either in my settings or somewhere in my WordPress install itself. Site registration is disabled but Invite Anyone is set to bypass that setting and allow registration. I still think that it’s something about not being able to set the site_options[‘registration’] value from ‘none’ to ‘user’ because of the “Indirect modification of overloaded property BuddyPress::$site_options has no effect” error, but I don’t know what could be causing that if the plugin is working for you, Ray.

    Any help would be great, we’re trying to avoid opening the site up to registration and keep it limited to the people we invite.

    August 15, 2013 at 8:12 pm #3431
    Daniel Jones
    Participant

    Well for what it’s worth I found a solution for this problem. I think the reason others may have had trouble reproducing it is that it only shows up on certain versions of PHP. My host (WP Engine) is running 3.5.2, which I think doesn’t allow for modifying overloaded properties, while some earlier and later versions of PHP don’t have that issue.

    I’ll put my fix here in case any one else runs into this issue/is using WP Engine.

    Go into the Invite Anyone plugin’s folder in via SSH or (S)FTP (/wp-content/plugins/invite-anyone) and then into the ‘by-email’ folder, then open ‘by-email.php’ and search for “$bp->site_options.” You should see a comment about a “royal hack until there is a filter on bp_get_signup_allowed()”

    Find this else if statement:

    else if ( !empty( $bp->site_options['registration'] ) && $bp->site_options['registration'] == 'none' )

    And inside of it replace this line:

    $bp->site_options['registration'] = 'user';

    With:

    $auxiliary_array = array();
        foreach( $bp->site_options as $key => $value ) {
    	if ( $key == 'registration' ) {
    	    $auxiliary_array[$key] = 'user';
    	}
    	else {
    	    $auxiliary_array[$key] = $value;
    	}
    }
    $bp->site_options = $auxiliary_array;

    This is for the specific case of allowing user registration without allowing users to create sites, but you ought to be able to figure out what changes you have to make for that from this.

    Please let me know if this isn’t something I should have done so I can change it back and find another solution.

    August 16, 2013 at 1:43 am #3434
    Ray
    Keymaster

    Hi Daniel,

    You might want to post your issue and solution on the Invite Anyone Github repository:
    https://github.com/boonebgorges/invite-anyone

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Log In
Group logo of CBOX Classic Support
  • Home
  • Forum
  • Announcements
  • Docs
  • Members 287
  • Send Invites

Groups

Newest | Active | Popular | Alphabetical
  • Group logo of CBOX Classic Support
    CBOX Classic Support
    287 members
  • Group logo of CBOX Pioneers
    CBOX Pioneers
    71 members
  • Group logo of CBOX Developers
    CBOX Developers
    40 members
  • Group logo of CBOX OpenLab Support
    CBOX OpenLab Support
    22 members
  • Group logo of CBOX-OL Testing Partners
    CBOX-OL Testing Partners
    12 members

CBOX has its roots in the CUNY Academic Commons, which in turn was made possible through funding from The City University of New York itself.

CUNY Logo

CUNY Academic Commons Logo

City Tech logo

The Commons In A Box was made possible through the generous support of the Alfred P. Sloan Foundation.

Alfred P. Sloan Foundation Logo

NEH Logo

The CUNY Graduate Center has directly contributed to the CUNY Academic Commons, housing the project since its inception, and has contributed to CBOX through its GC Digital Initiatives.

CUNY Graduate Center Logo

CUNY Graduate Center Digital Initiatives Logo

Powered by Commons In A Box
css.php
Skip to toolbar
  • About WordPress
    • WordPress.org
    • Documentation
    • Learn WordPress
    • Support
    • Feedback
  • Log In
  • Register