[buddypress-trac] [BuddyPress Trac] #6520: xprofile_check_is_required_field should also check for capability when in admin

buddypress-trac noreply at wordpress.org
Mon Jun 22 14:55:56 UTC 2015


#6520: xprofile_check_is_required_field should also check for capability when in
admin
-----------------------------------+--------------------
 Reporter:  thomaslhotta           |       Owner:
     Type:  defect (bug)           |      Status:  new
 Priority:  normal                 |   Milestone:  2.4
Component:  Component - XProfile   |     Version:  2.3.2
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |
-----------------------------------+--------------------
Changes (by boonebgorges):

 * keywords:   => has-patch 2nd-opinion


Comment:

 [attachment:6520.diff] is a suggested solution. The idea here is that the
 `field_is_required()` functions should return the same thing for everyone,
 as it's a property of the field only (not the field-user combo). Then, in
 the relevant places where these functions are used in BP - namely, during
 form submission - bp_moderate users are able to bypass the requirements.
 I've chosen to leave the "(required)" label in place even for
 'bp_moderate' users, because IMO it's useful information, even if you
 choose to bypass it.

 Note that 6520.diff will break backward compatibility in cases where the
 `field_is_required()` functions are called directly, and the plugin
 expects the function to return true for 'bp_moderate' users. I doubt
 anyone's doing this, and if they are, they're subject to the same bug
 being raised in this ticket, so I don't mind the change in behavior.

 Anyone have thoughts about this approach?

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6520#comment:2>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list