[buddypress-trac] [BuddyPress] #5042: Disable certain pages for logged-in users

buddypress-trac noreply at wordpress.org
Thu Jun 20 10:11:14 UTC 2013


#5042: Disable certain pages for logged-in users
-------------------------+------------------------------
 Reporter:  henrywright  |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Core         |     Version:  1.7
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+------------------------------

Comment (by henrywright):

 This is how I am doing it. The conditional just checks for logged in users
 visiting the homepage but this could be changed or added to if necessary.

 {{{

 function bp_redirect_loggedin_to_profile() {
         global $bp;

         if(is_user_logged_in() && ( bp_is_front_page() )) {
                 wp_redirect( $bp->loggedin_user->domain );
         }
 }
 add_action('wp','bp_redirect_loggedin_to_profile');

 }}}

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5042#comment:1>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list