[buddypress-trac] [BuddyPress] #3044: bp-xprofile Add Hook before saving xprofile field data

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Fri Feb 4 08:30:28 UTC 2011

#3044: bp-xprofile Add Hook before saving xprofile field data
  Reporter:  marinig      |      Owner:
      Type:  enhancement  |     Status:  new
  Priority:  normal       |  Milestone:  Awaiting Review
 Component:  XProfile     |    Version:
Resolution:               |   Keywords:

Comment (by marinig):

 Replying to [comment:2 DJPaul]:
 > What about using 'xprofile_data_value_before_save' or
 'xprofile_data_before_save' in BP_XProfile_ProfileData::save()?

 Yes but I think my suggestion is simpler to use and more versatile... at
 least in my opinion.

 What if I have to use the field name and field value at the same time (in
 the same filter function)? I can't use any of the hooks you indicated as
 they pass just one of them (field ID or field value) at a time... So I
 can't do different filtering on values basing on field name... I may be
 wrong, so please, correct me if there is a solution using those hooks.

 Considering the hooks you wrote above, I could use the action hook
 "xprofile_data_before_save" but I must declare global $this in the hooked
 function in order to apply changes made, and I don't like this very much.

 Thanks for your time

Ticket URL: <https://trac.buddypress.org/ticket/3044#comment:3>
BuddyPress <http://buddypress.org/>

More information about the buddypress-trac mailing list