Introduction
BuddyBoss shows a “Successfully Registered” page after account creation. There is no built-in option to bypass this page and redirect users directly to the login page. You can achieve this by adding a custom function to your theme. This guide explains how you can redirect users to login after registration.
Custom Workaround
Before proceeding, make sure you have a complete site backup.
- In your WordPress admin dashboard, go to Appearance > Theme File Editor.
- Under Select theme to edit, choose your active theme (preferably BuddyBoss Child Theme), then click Select.
- From the Theme Files list, click Theme Functions (functions.php).
- Paste the following code just before the closing PHP tag (?>):
remove_action( 'bp_actions', 'bp_members_action_activate_account_custom' );
function bp_members_action_activate_account_custom() {
if ( ! bp_is_current_component( 'activate' ) ) {
return;
}
if ( is_user_logged_in() ) {
return;
}
if ( ! empty( $_POST['key'] ) ) {
$key = wp_unslash( $_POST['key'] );
} elseif ( ! empty( $_GET['key'] ) ) {
$key = wp_unslash( $_GET['key'] );
}
if ( empty( $key ) ) {
return;
}
$bp = buddypress();
$user = apply_filters( 'bp_core_activate_account', bp_core_activate_signup( $key ) );
// If there were errors, add a message and redirect
if ( ! empty( $user->errors ) ) {
bp_core_add_message( $user->get_error_message(), 'error' );
bp_core_redirect( trailingslashit( bp_get_root_domain() . '/' . $bp->pages->activate->slug ) );
}
bp_core_add_message( __( 'Your account is now active!', 'buddyboss' ) );
// Redirect users to the login page instead of the confirmation page
bp_core_redirect( 'http://buddyboss.local/login/' );
}
add_action( 'bp_actions', 'bp_members_action_activate_account_custom' );- Click Update File to save your changes.
Troubleshooting and FAQs
Q: Users are still seeing the “Successfully Registered” page, what should I check?
A: Ensure the code is added to the active child theme’s functions.php and that you cleared any caching plugins.
Q: Can I redirect users to a different page?
A: Yes, replace ‘http://buddyboss.local/login/’ with the URL of the desired page.
Q: Will this affect account activation errors?
A: No, users with activation errors are still redirected to the activation page with an error message.
Q: Can I revert this change easily?
A: Yes, remove the code from functions.php and save.
Q: Who can I contact for further assistance?
A: Please review the BuddyBoss Support Policy or consult a developer.