Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Set User account inactive when they verify/activate their BuddyPress Account
/**
* Mark account status as inactive when they activate their BuddyPress account after signup.
*
* @param int $user_id user id.
*/
function buddydev_custom_keep_user_inactive( $user_id ) {
if ( ! function_exists( 'bp_account_deactivator' ) ) {
return;
}
bp_account_deactivator()->set_inactive( $user_id );
}
add_action( 'bp_core_activated_user', 'buddydev_custom_keep_user_inactive' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.