Skip to content

Commit 7ac554d

Browse files
authored
Merge pull request #298 from creativecommons/staging
public institutional member list & profile
2 parents a1e2974 + a5a0b5f commit 7ac554d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

plugins/cc-global-network/includes/buddypress-integration.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
}
2525

2626
// The user has not been vouched by other members, but is considered vouched
27-
define( 'COMMONERS_USER_IS_AUTOVOUCHED', 'ccgn-user-autovouched' );
27+
define( 'CCGN_USER_IS_AUTOVOUCHED', 'ccgn-user-autovouched' );
2828

2929
////////////////////////////////////////////////////////////////////////////////
3030
// Buddypress config
@@ -896,14 +896,16 @@ function _bp_not_signed_in_redirect () {
896896
// In order to leave those profiles in public
897897
global $wp_query;
898898
$user = get_user_by('slug',$wp_query->query_vars['name']);
899+
$bp = buddypress();
900+
$institutional_directory = ($bp->current_member_type == 'institutional-member') ? true : false;
899901
$institutional_member = ccgn_member_is_institution($user->data->ID);
900902

901903
if ( (bp_is_directory()
902904
|| bp_is_activity_component() || bp_is_groups_component()
903905
// || bp_is_group_forum() // || bp_is_page( BP_MEMBERS_SLUG )
904906
|| bp_is_profile_component() || bp_is_forums_component() )
905907
/*|| bbp_is_single_forum() || bbp_is_single_topic()*/
906-
&& (!$institutional_member)
908+
&& (!$institutional_member) && (!$institutional_directory)
907909
) {
908910
if( ! is_user_logged_in() ) {
909911
wp_redirect(

0 commit comments

Comments
 (0)