Skip to:
Content

BuddyPress.org

Ticket #4984: 4984.diff

File 4984.diff, 848 bytes (added by imath, 11 years ago)
  • bp-xprofile/bp-xprofile-functions.php

     
    694694
    695695                // current user is logged-in but not friends, so exclude friends-only
    696696                } else {
    697                         $hidden_levels = array( 'friends' );
    698697
    699698                        if ( ! bp_current_user_can( 'bp_moderate' ) )
    700                                 $hidden_levels[] = 'adminsonly';
     699                                $hidden_levels = array( 'friends', 'adminsonly' );
    701700
    702701                        $hidden_fields = bp_xprofile_get_fields_by_visibility_levels( $displayed_user_id, $hidden_levels );
    703702                }
     
    742741        }
    743742
    744743        $field_ids = array();
     744
    745745        foreach( (array) $user_visibility_levels as $field_id => $field_visibility ) {
    746746                if ( in_array( $field_visibility, $levels ) ) {
    747747                        $field_ids[] = $field_id;