The function below can be used to get all ¬†of a user’s capabilities:

You can pass a user’s ID or a user object to it, and it will return an array of capabilities like the one pictured below, or an empty array if the user has no capabilities or doesn’t exist.


Leave a reply

Your email address will not be published. Required fields are marked *