Moderate user creation

Sometimes it is useful to moderate the users who register your site. Let's see how to fix it with BuddyForms.

Important
This is not an option that has BuddyForms by default so we need a little bit of code. 

This functionality is available since version 2.5.19

If you do not have the experience, it will not be as easy as installing the snippets plugin, creating a new snippet and pasting the following code. 

/**
 * Disable the email notification for new user. Be aware you can use this function at form level using the parameter `$form-slug`
 * This hook is available since version 2.5.19.
 *
 * @param $activate
 * @param $new_user_id
 * @param $form_slug
 *
 * @return mixed
 * @since 2.5.19
 *
 */
function buddyforms_wp_insert_user_activation_mail_callback( $activate, $new_user_id, $form_slug ) {
	return false;
}

add_filter( 'buddyforms_wp_insert_user_activation_mail', 'buddyforms_wp_insert_user_activation_mail_callback', 10, 3 );

Already with that code, we indicate BuddyForms not to send the activation email that is sent by default.

With this, all you have to do is go to the user administration in the WordPress backend and activate them manually.

You can activate them using the actions that appear when you mouse over a user in the list.

Still need help? Contact Us Contact Us