Skip to:
Content
Pages
Categories
Search
Top
Bottom

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


Ruth Maude
Participant

@dandelionweb

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
}

Skip to toolbar