File tree 1 file changed +4
-2
lines changed
plugins/cc-global-network/includes
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 24
24
}
25
25
26
26
// 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 ' );
28
28
29
29
////////////////////////////////////////////////////////////////////////////////
30
30
// Buddypress config
@@ -896,14 +896,16 @@ function _bp_not_signed_in_redirect () {
896
896
// In order to leave those profiles in public
897
897
global $ wp_query ;
898
898
$ user = get_user_by ('slug ' ,$ wp_query ->query_vars ['name ' ]);
899
+ $ bp = buddypress ();
900
+ $ institutional_directory = ($ bp ->current_member_type == 'institutional-member ' ) ? true : false ;
899
901
$ institutional_member = ccgn_member_is_institution ($ user ->data ->ID );
900
902
901
903
if ( (bp_is_directory ()
902
904
|| bp_is_activity_component () || bp_is_groups_component ()
903
905
// || bp_is_group_forum() // || bp_is_page( BP_MEMBERS_SLUG )
904
906
|| bp_is_profile_component () || bp_is_forums_component () )
905
907
/*|| bbp_is_single_forum() || bbp_is_single_topic()*/
906
- && (!$ institutional_member )
908
+ && (!$ institutional_member ) && (! $ institutional_directory )
907
909
) {
908
910
if ( ! is_user_logged_in () ) {
909
911
wp_redirect (
You can’t perform that action at this time.
0 commit comments