Re: Privacy component–where is it?
Hey all-
I’m trying to create a very simple plugin workaround but I’m doing something wrong in the coding. Would someone here more experienced than I be willing to help me figure out what I’m doing wrong? I’m basically just trying to redirect non-logged in users to a specific page that tells them they need to be logged in. This was inspired by the BP Profile as Homepage plugin.
But right now I’m getting this error:
`Parse error: syntax error, unexpected $end in /home/content/65/3511365/html/anthempages/wp-content/plugins/BP Privacy Redirect/bp_privacy_redirect.php on line 71`
I may be way off but it may just be a simple fix.
Any thoughts? Anyone? Pretty please? (I’m not above begging!)
`<?php
function members_logged_in_only()
{ global $bp;
if(is_user_logged_in() && $SERVER{‘REQUEST_URI’}==’/activity/’){
/*user is logged in*/
}else{
wp_redirect(get_option(‘siteurl’) . ‘/welcome’);
}
function members_logged_in_only()
{ global $bp;
if(is_user_logged_in() && $SERVER{‘REQUEST_URI’}==’/members/’){
/*user is logged in*/
}else{
wp_redirect(get_option(‘siteurl’) . ‘/welcome’);
}
function groups_logged_in_only()
{ global $bp;
if(is_user_logged_in() && $SERVER{‘REQUEST_URI’}==’/groups/’){
/*user is logged in*/
}else{
wp_redirect(get_option(‘siteurl’) . ‘/welcome’);
}
function forums_logged_in_only()
{ global $bp;
if(is_user_logged_in() && $SERVER{‘REQUEST_URI’}==’/forums/’){
/*user is logged in*/
}else{
wp_redirect(get_option(‘siteurl’) . ‘/welcome’);
};
?>`