[buddypress-trac] [BuddyPress] #4296: Base xprofile field Name(primary) and visibility when logged in as superadmin

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Sat Jun 23 18:01:31 UTC 2012


#4296: Base xprofile field Name(primary) and visibility when logged in as
superadmin
--------------------------+-----------------------------
 Reporter:  imath         |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Core          |    Version:  1.6-beta
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 If i'm logged in as superadmin, then in the front end on my profile edit
 page or profile edit page of members html gives me the impression i can
 change this field, it actually doesn't change but i think it's a bit
 confusing. So i opened bp-core/bp-core-caps.php at line 380 function
 bp_current_user_can. And i saw a comment before the first if statement

 {{{
 // @todo: remove this when implemented
         if ( is_super_admin() )
                 return true;
 }}}
  So i first try to remove this condition, but if i do so, then i get a 404
 when trying to edit another user's profile on front end..

 So i simply added in the condition && $capability !=
 'bp_xprofile_change_field_visibility' and it seems to work

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4296>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list