Did you ever figure this out techguy? I’m a first-timer building a buddypress site for a non-profit and would like to use both invite-anyone and disable the activation email..
@techwadi
I don’t think I ever figured it out for WPMU. I tried all sorts of hooks and then gave up. I just moved the invite anyone function call into one of my other plugins to handle that part of the process. I’d share my code, but I’ve changed the sign up process pretty significantly and so I don’t think you would find it useful. Sorry.
@crashutah Can you remind me which part of Invite Anyone hooks into bp_core_activated_user? (I’m too lazy to search myself
) I assume it’s the part that sends group invites and starts friendships after a member has joined?
invite_anyone_activate_user() is the function.
Here’s some other places I tried to hook it to varying degrees of success:
//add_action( ‘bp_core_activation_signup_user_notification’, ‘invite_anyone_activate_user’, 10, 3 ); //NOWORK
//add_action( ‘bp_auto_activate_after_login’, ‘invite_anyone_activate_user’, 10, 3 ); //Tried to hook it to a function in the disable activation plugin. Not sure why it didn’t work
//add_action( ‘bp_core_account_activated’, ‘invite_anyone_activate_user’, 10, 3 ); //WPMU hooked to login creation -Kind of WORKS No UserID
//add_action( ‘wpmu_signup_user_notification’, ‘invite_anyone_activate_user’, 10, 3 ); //WPMU hooked to signup -NOWORK
Any progress on this front? I’d love to use both plugins, too. If this isn’t something that’s going to happen, I can find another way around it, but would like to know that I should start working on figuring one out.
Thanks.
I’ll try to take a look at it by the end of the week.
Boone helped me get this figured out. So, cheers to him!
Essentially this uses another hook to call the bp_core_activated_user hook so that plugins that use it will now run when the user is auto registered.
I put this in my functions.php and tested it and got all the welcome pack emails.
`function bp_core_activation_hook( $user_id ) {
$user = get_userdata( $user_id );
do_action( ‘bp_core_activated_user’, $user_id, ”, $user );
}
add_action( ‘bp_core_signup_user’, ‘bp_core_activation_hook’ );
`