I am using BuddyPress 2 registration and activation for three different sites with my own registration form.
To know where the user has registered, I add the user meta key registered_from at registration.
Is there a way to redirect the user after activation to the site where he registered?
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
|
|
||||
|
|
|
Paste this code in your
add_action( 'bp_core_activated_user', 'wpse_70289_activated_user_redirect' );
function wpse_70289_activated_user_redirect( $user_id ) {
$registered_from = get_user_meta( $user_id, 'registered_from', true );
wp_redirect( $registered_from );
}
I haven't tested this code myself yet, but it should work just fine. References: |
|||||||
|
