Skip to:
Content
Pages
Categories
Search
Top
Bottom

Activate new users? Only logged in users can create blogs…. but not disable new user registrations

  • @dandelionweb

    Participant

    I’ve been looking on the forum and through the buddypress for dummies book and I can’t find answers to these questions:

    Is it possible to set it so an admin has to activate a new user before they can do anything on the site?
    Is it possible to set only logged in users can create blogs while still allowing new user registrations?

    I also have a number of plugins that won’t activate without crashing my whole site. Is this possibly because the site isn’t using php5? I want to allow people to upload photos but none of the photo plugins seem to work.

    Thanks for your help,

    ~ Ruth
    The Clubfoot Club

Viewing 19 replies - 1 through 19 (of 19 total)
  • @sbrajesh

    Participant

    hi
    For your first question, you may want to try this plugin
    https://wordpress.org/extend/plugins/bp-registration-options/
    checkout this thread too
    https://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/moderate-members/

    For the second, yes, It is possible. Just go to SiteAdmin->Options and select the radio box which says only logged in users can create blog.
    PHp5 may be an issue, better why not ask your server adminstrator to upgrade.

    @dandelionweb

    Participant

    Thanks for your response Brajesh – I’ll check these out

    for the second…. if I select only logged in users can create new blogs this also disables new user registration completely.

    Yes I need to have the host upgrade to PHP5 but I have a number of sites on the account and I just don’t have time right now to do any debugging if things break right now.

    @mercime

    Participant

    There is a hack to core BP files which can be turned into a plugin (hint, hint) which works in BP 1.2.3 and WPMU 2.9.2 …

    @dandelionweb

    Participant

    sigh… like a number of plugins the bp-registration-options won’t activate

    Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /…../clubfootclub.org/community/wp-content/plugins/bp-registration-options/bp-registration-options.php on line 23

    @sbrajesh

    Participant

    @mercime :)
    @dandelionweb
    For signups, please select the box which says user and blogs can be created.

    To disable blog creation by non logged in user, put this code in your theme’s functions.php or bp-custom.php
    Here is the code on pastebin(current forum has trouble posting code, so i posted it there).
    http://bpdev.pastebin.com/1AyszwQ7

    And the issue with bp-registration-options seems to be of PHP5.

    @r-a-y

    Keymaster

    @mercime – that hack you linked to is totally unnecessary! It is possible to use filters to achieve the same result. The same method was brought up in the IRC room a few days ago. It is actually quite a nice way around the problem ;)

    @dandelionweb

    Participant

    excuse me r-a-y what is the IRC room? could you give me a link?

    @r-a-y

    Keymaster

    #buddypress-dev on freenode.

    Or use this java applet:
    http://java.freenode.net/?channel=buddypress-dev

    @dandelionweb

    Participant

    @r-a-y I have no idea where to begin with this…. I guess I’ll give the core hack a try

    thanks

    @r-a-y

    Keymaster

    @dandelionweb


    function my_redirect_activation_email()
    {
    return get_site_option( "admin_email" );
    }
    add_filter('bp_core_activation_signup_user_notification_to', 'my_redirect_activation_email');

    Add this to wp-content/plugins/bp-custom.php or your theme’s functions.php file.

    @dandelionweb

    Participant

    @r-a-y I’m using WPMU

    @r-a-y

    Keymaster

    @dandelionweb

    Try using the post snippet I posted above.

    @dandelionweb

    Participant

    Thanks so much @r-a-y that code worked….

    I’m really struggling to find my way around – I’m experienced with WP but not with WPMU or BuddyPress structure. How do I change this text?

    Sign Up Complete!
    You have successfully created your account! To begin using this site you will need to activate your account via the email we have just sent to your address.

    @dandelionweb

    Participant

    found it I think… wp-content/plugins/buddypress/bp-themes/bp-default/registration/register.php, line 225,

    @dandelionweb

    Participant

    THANK YOU! THANK YOU! THANK YOU!

    So all I had to do was add the following two code snippets to my /wp-content/plugins/buddypress/bp-themes/bp-default/functions.php file and both these issues are fixed! Next step will be upgrading to php5.

    /*redirect activation email to admin for approval*/
    function my_redirect_activation_email()
    {
    return get_site_option( “admin_email” );
    }
    add_filter(‘bp_core_activation_signup_user_notification_to’, ‘my_redirect_activation_email’);

    /*disable blog signup for non logged in member*/
    add_filter(“wpmu_active_signup”,”bpdev_check_current_users_blog”);
    function bpdev_check_current_users_blog($active_signup){
    global $current_user;
    if( !is_user_logged_in() )
    return “none”;
    else
    return $active_signup;//if the user is logged in, do not change the site policies
    }

    @r-a-y

    Keymaster

    @dandelionweb

    It’s better to make your changes in a child theme. This way your changes will not be overwritten when you have to upgrade BP.

    @dandelionweb

    Participant

    The /*disable blog signup for non logged in member*/ code from @sbrajesh didn’t work… it didn’t remove the create a blog from the signup page.. I got a spam blog within minutes.

    ah well that’s it for this rainy Sunday afternoon…. When I get some time next I’ll start but updating to php5 and then I’ll check back with the forum. Thanks everyone!

    ~ Ruth

    @mercime

    Participant

    @sbrajesh and @r-a-y, it was the bad bad mercime who added the link to the hack. i promise never to let my alter ego do it again :-)

    @dandelionweb

    Participant

    the hack adds “the new users’ e-mail address to the e-mail with the activation link. This way you’ll know which activation link belongs to which user.” This is really needed!

    Is there another line to add to functions.php that will add the email address?

    Actually what we need is a plugin that creates a pending membership panel in the admin so you can go in and active or mark as spam… just like comments!

Viewing 19 replies - 1 through 19 (of 19 total)
  • The topic ‘Activate new users? Only logged in users can create blogs…. but not disable new user registrations’ is closed to new replies.
Skip to toolbar