Reply To: How to get an ID of a user who was just activated?
No @henrywright. At this point, the user has just clicked on the activation link in email.
@shanebp suggested this function. It’s working but I can’t get it to return an id that I can store in a GLOBAL variable so that I can use it somewhere else on activation page with this hook:
bp_after_activate_content
Here’s the function that @shanebp suggested.
function william_bp_core_activated_user( $user_id, $key, $user ) {
// do something with $user_id
// there is no return for add_action, only add_filter
};
add_action( 'bp_core_activated_user', 'william_bp_core_activated_user', 10, 3 );