/*Reverse sticky header*/

Disable validation for registration

By default, the platform does not have this option. You can use the following function code to disable validation for registration.

Please follow the steps below:

1. Go to Appearance > Theme Editor.

2. Under “Select theme to edit”, choose (BuddyBoss Child/whatever theme is active), then click “Select”.

3. Below Theme Files, select Theme Functions (functions.php).

4. Append the code just before the closing PHP tag “?>”:

function disable_validation( $user_id ) { global $wpdb; $wpdb->query( $wpdb->prepare( "UPDATE $wpdb->users SET user_status = 0 WHERE ID = %d", $user_id ) ); $users = $wpdb->get_results( "SELECT activation_key, user_login FROM {$wpdb->prefix}signups WHERE active = '0' "); foreach ($users as $user) { bp_core_activate_signup($user->activation_key); BP_Signup::validate($user->activation_key); //fix roles $user_id = $wpdb->get_var( "SELECT ID FROM $wpdb->users WHERE user_login = '$user->user_login'"); $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' );

5. Click Update File to save the changes.

Note: Any modifications are considered as custom work already. Know more about our Support Policy here: https://www.buddyboss.com/support-policy/

Was this article helpful?

Related Articles

Subscribe to Our Newsletter

Stay In Touch

Subscribe to our Newsletter, and we’ll send you the latest news from BuddyBoss

  • This field is hidden when viewing the form
  • This field is for validation purposes and should be left unchanged.

To speak to our Agency consultant, fill in the form found at our Contact Page.

"*" indicates required fields

Get Started

Enter your name and email address to get started with your project...

Name*
Profile photo of
Not recently active