Hi,
I'm trying to disable the require activation of new users registered by BP.
I've tried using the following cose in functions.php, but it does not work.
I want that administrators don't need to activate users. Can you help me please?
PS. I'm using different registration forms (one for Students, one for Instructors).
function disable_validation( $user_id ) {
global $wpdb;
$wpdb->query( $wpdb->prepare( "UPDATE $wpdb->users SET user_status = 0 WHERE ID = %d", $user_id ) );
}
add_action( 'bp_core_signup_user', 'disable_validation' );
function fix_signup_form_validation_text() {
return false;
}
add_filter( 'bp_registration_needs_activation', 'fix_signup_form_validation_text' );
Hi...
Try using wplms registration form for this, you can easily disable the activation process in it.
Please refer this tutorial :
https://vibethemes.com/documentation/wplms/knowledge-base/custom-registration-forms-in-wplms/