[buddypress-trac] [BuddyPress Trac] #7882: Stop mirroring user last_activity data to usermeta

buddypress-trac noreply at wordpress.org
Tue Apr 23 15:22:56 UTC 2019


#7882: Stop mirroring user last_activity data to usermeta
------------------------------------+----------------------
 Reporter:  boonebgorges            |       Owner:  (none)
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  Up Next
Component:  Members                 |     Version:  2.0
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+----------------------
Changes (by r-a-y):

 * keywords:  has-patch => has-patch dev-feedback


Comment:

 This will break legacy user queries that need the entry in the
 `$wpdb->usermeta` DB table in order to sort by last active or online:
 https://buddypress.trac.wordpress.org/browser/tags/4.2.0/src/bp-
 core/classes/class-bp-core-user.php#L284
 https://buddypress.trac.wordpress.org/browser/tags/4.2.0/src/bp-
 core/classes/class-bp-core-user.php#L341

 Also the `get_user_extras()` method would need to be updated to fetch the
 timestamp from the activity DB table:
 https://buddypress.trac.wordpress.org/browser/tags/4.2.0/src/bp-
 core/classes/class-bp-core-user.php#L721

 It would almost be like rewriting the legacy user query to use the newer
 one, which would defeat the purpose of implementing this ticket! ☺

 I think a better approach would be to use the existing
 `'bp_use_legacy_user_query'` filter to determine if we should continue
 mirroring, instead of introducing a newer filter solely for this as in
 `7882.diff`.

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


More information about the buddypress-trac mailing list