Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // **** Privacy ********
- function restrict_access(){
- global $bp, $bp_unfiltered_uri;
- // If user is not logged in and
- if (!is_user_logged_in() &&
- (
- // The current page is not register or activation
- !bp_is_register_page() &&
- !bp_is_activation_page()
- )
- ) {
- // Redirect to registration page. Change /join to your register page slug
- bp_core_redirect( get_option('home') . '/join' );
- }
- }
- add_action( 'wp', 'restrict_access', 3 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement