[buddypress-trac] [BuddyPress Trac] #5755: xprofile_updated_profile action not properly passed old values

buddypress-trac noreply at wordpress.org
Wed Jul 16 02:23:50 UTC 2014


#5755: xprofile_updated_profile action not properly passed old values
--------------------------+-----------------------------
 Reporter:  Viper007Bond  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  XProfile      |    Version:  2.0
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 The function `xprofile_screen_edit_profile()` updates profile fields and
 has `$new_values` and `$old_values` variables which are passed to the
 `xprofile_updated_profile` action. This action is useful for monitoring
 when profile fields are updated.

 The problem is that `$old_values` is called ''after'' the value is updated
 via `xprofile_set_field_data()`. This means that `$old_values` will always
 contain the ''new'' values.

 The attached patch (my first BP one!) resolves the issue in my limited
 testing. It moves the `$old_values` definition to before the field is
 updated.

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


More information about the buddypress-trac mailing list