[buddypress-trac] [BuddyPress Trac] #8388: BP_XProfile_ProfileData::delete_data_for_user() doesn't clear cache
buddypress-trac
noreply at wordpress.org
Tue Nov 10 22:16:15 UTC 2020
#8388: BP_XProfile_ProfileData::delete_data_for_user() doesn't clear cache
------------------------------+-----------------------
Reporter: dd32 | Owner: dcavins
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 6.4.0
Component: Extended Profile | Version:
Severity: normal | Resolution:
Keywords: has-patch |
------------------------------+-----------------------
Comment (by r-a-y):
I like version 2 for the reason dcavins mentioned about the
`'xprofile_data_before_delete'` and `'xprofile_data_after_delete'` hooks
actually being called during profile data deletion.
In version 2, I think dcavins meant to replace
`BP_XProfile_ProfileData::delete_data_for_user()` with
`xprofile_remove_data()` though. So that's what I did in `03.diff`. Also
currently, `BP_XProfile_ProfileData::delete_data_for_user()` expects an
integer of deleted rows if successful so I've added this to the
`xprofile_remove_data()` function. This doesn't account for a `false`
return value though. If we don't care about the return value, remove the
`count()` statement.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8388#comment:7>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list