Skip to content

Instantly share code, notes, and snippets.

@sbrajesh
Created June 17, 2018 20:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sbrajesh/e10452da07ab0a68b1cf457b87a3ec66 to your computer and use it in GitHub Desktop.
Save sbrajesh/e10452da07ab0a68b1cf457b87a3ec66 to your computer and use it in GitHub Desktop.
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