Opened 5 years ago
Last modified 5 years ago
#45197 new enhancement
Introduce `user_can_for_blog()`
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | |
Component: | Role/Capability | Keywords: | needs-unit-tests has-patch |
Focuses: | multisite | Cc: |
Description
The available user capability checking functions include:
current_user_can()
user_can()
current_user_can_for_blog()
What's missing is user_can_for_blog()
so that both a user ID and a site ID can be passed in order to check a given user's capabilities on a given site.
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
+1 to this.
I have coded some version of this logic at least a few times (into private methods in plugins.)
I can adapt something into a patch, but it’s pretty straight forward if anyone wants to try.