Opened 13 years ago
Closed 13 years ago
#24490 closed enhancement (fixed)
Pass $this to WP_User::has_cap()'s "user_has_cap" filter
| Reported by: | Viper007Bond | Owned by: | wonderboymusic |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.7 |
| Component: | Role/Capability | Version: | 3.5.1 |
| Severity: | normal | Keywords: | has-patch 3.7-early |
| Cc: | Focuses: |
Description
When hooking into the user_has_cap filter to modify the result of a user's capability checks (for example current_user_can()), the filter is not provided access to the user's object. This is important for cases like where WP_User::for_blog() has been called but you only want to modify a user's capabilities for a certain blog.
Attachments (1)
Change History (5)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
these are all marked 3.7-early