Introduction
BuddyBoss does not provide a built-in option to disable registration validation. By default, new users must complete the activation/validation process before their accounts become active. However, you can bypass this behavior using a custom function that automatically activates users upon registration.
Custom Workaround
Before proceeding, make sure you have a complete site backup.
- Go to Appearance > Theme Editor in your WordPress admin dashboard.
- Under Select theme to edit, choose your active theme (preferably a BuddyBoss Child Theme), then click Select.
- From the Theme Files list, open Theme Functions (functions.php).
- Add the following code just before the closing PHP tag (?>):
function disable_validation( $user_id ) {
global $wpdb;
// Ensure the user is marked as active
$wpdb->query(
$wpdb->prepare(
"UPDATE $wpdb->users SET user_status = 0 WHERE ID = %d",
$user_id
)
);
// Get all inactive signups
$users = $wpdb->get_results(
"SELECT activation_key, user_login FROM {$wpdb->prefix}signups WHERE active = '0'"
);
foreach ( $users as $user ) {
// Activate the signup
bp_core_activate_signup( $user->activation_key );
BP_Signup::validate( $user->activation_key );
// Assign default role
$user_id = $wpdb->get_var(
"SELECT ID FROM $wpdb->users WHERE user_login = '$user->user_login'"
);
if ( $user_id ) {
$u = new WP_User( $user_id );
$u->add_role( 'subscriber' );
}
}
}
add_action( 'bp_core_signup_user', 'disable_validation' );
add_filter( 'bp_registration_needs_activation', '__return_false' );
add_filter( 'bp_core_signup_send_activation_key', '__return_false' );
- Click Update File to save the changes.
This code automatically activates newly registered users, skips email activation, and assigns them the Subscriber role.
Troubleshooting and FAQs
Q: Users are still receiving activation emails.
A: Make sure all three filters (bp_registration_needs_activation, bp_core_signup_send_activation_key, and the action hook) are present and added correctly. Clear any caching plugins and test again.
Q: Will this affect existing users?
A: No. This only affects new registrations going forward.
Q: Is this safe to use on public sites?
A: Disabling validation increases the risk of spam registrations. It’s recommended to pair this with CAPTCHA, reCAPTCHA, or other anti-spam measures.
Q: Can I revert this change easily?
A: Yes. Remove or comment out the code from functions.php and save the file.
Q: Will this work with custom registration forms?
|A: It works with BuddyBoss/BuddyPress-based registrations. Third-party registration plugins may require additional handling.