bp_core_profile_dashboard_non_logged_redirect()
Redirect user to profile dashboard if not logged in.
Description
Source
File: bp-core/bp-core-catchuri.php
function bp_core_profile_dashboard_non_logged_redirect() {
if ( !is_user_logged_in() ) {
if ( function_exists( 'bp_nouveau_get_appearance_settings' ) ) {
if ( bp_nouveau_get_appearance_settings( 'user_front_page' ) ) {
$page_ids = bp_core_get_directory_page_ids();
$profile_dashboard = isset( $page_ids['profile_dashboard'] ) ? $page_ids['profile_dashboard'] : false;
if ( $profile_dashboard > 0 ) {
if ( is_page( $profile_dashboard ) ) {
wp_safe_redirect( site_url() );
exit();
}
}
}
}
}
}
Changelog
| Version | Description |
|---|---|
| BuddyBoss 1.0.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.