[buddypress-trac] [BuddyPress] #4984: Admin authority not being respected for xprofile field visibility

buddypress-trac noreply at wordpress.org
Tue Aug 27 21:26:10 UTC 2013


#4984: Admin authority not being respected for xprofile field visibility
--------------------------+-----------------------
 Reporter:  ubernaut      |       Owner:
     Type:  defect (bug)  |      Status:  reopened
 Priority:  high          |   Milestone:  1.8.2
Component:  XProfile      |     Version:  1.7
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+-----------------------
Changes (by imath):

 * keywords:  needs-patch => has-patch


Comment:

 Hello,

 Problem seemed to be that the array of hidden fields was partially set
 before bp_current_user_can('bp_moderate');

 so regular user had array( 'friends', 'adminsonly') as expected
 but admin got array('friends') instead of nothing, so in the patch i build
 the array of visibility after bp_current_user_can('bp_moderate') and it
 seems to solve the trouble.

 in bp_xprofile_get_fields_by_visibility_level() i've also set $field_ids
 as an array as i've seen a notice.

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


More information about the buddypress-trac mailing list