[buddypress-trac] [BuddyPress Trac] #7192: Improve $args included in `bp_current_user_can` and `bp_user_can` filters.

buddypress-trac noreply at wordpress.org
Thu Sep 15 03:12:28 UTC 2016


#7192: Improve $args included in `bp_current_user_can` and `bp_user_can` filters.
------------------------------+-----------------------
 Reporter:  dcavins           |       Owner:  dcavins
     Type:  defect (bug)      |      Status:  reopened
 Priority:  normal            |   Milestone:  2.7
Component:  Core              |     Version:  1.6
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |
------------------------------+-----------------------

Comment (by r-a-y):

 `$bp->loggedin_user->ID` is initialized on `'bp_setup_globals'`, which is
 quite late in the action firing sequence:
 https://buddypress.trac.wordpress.org/browser/tags/2.6.2/src/bp-
 core/classes/class-bp-core.php#L215

 We should probably consider initializing `$bp->loggedin_user->ID` earlier,
 but for 2.7, let's just leave this alone.

 I've refreshed my `get_current_user_id.patch` to add the
 `'bp_loggedin_user_id'` filter.

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


More information about the buddypress-trac mailing list