Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Custom redirect after auto activation/auto login
* Redirect user to some page on site when automatically activated and logged in.
* @param string $url url to redirect to.
* @param int $user_id user id.
* @return string
function buddydev_custom_activation_redirect( $url, $user_id ) {
$url = site_url( '/your-page/' );// change to where you want to redirect.
return $url;
add_filter( 'bpdev_autoactivate_redirect_url', 'buddydev_custom_activation_redirect', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.