Created
June 17, 2018 20:05
-
-
Save sbrajesh/e10452da07ab0a68b1cf457b87a3ec66 to your computer and use it in GitHub Desktop.
Set User account inactive when they verify/activate their BuddyPress Account
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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