UserPermissionsVariable
- Type
- Class
- Namespace
- Craft
- Inherits
- Craft\UserPermissionsVariable
- Since
- 1.0
User permission functions.
See also http://craftcms.com
View source (opens new window)
# Public Methods
Method | Description |
---|---|
getAllPermissions() | Returns all of the known permissions, sorted by category. |
getAssignablePermissions() | Returns the permissions that the current user is allowed to assign to another user. |
getGroupPermissionsByUserId() | Returns all of the group permissions a given user has. |
# getAllPermissions()
Signature
public array getAllPermissions ( )
# getAssignablePermissions()
Returns the permissions that the current user is allowed to assign to another user.
View source (opens new window)
Arguments
$user
(Craft\UserModel, null (opens new window)) – The recipient of the permissions. If set, their current permissions will be included as well.
Returns
Signature
public array getAssignablePermissions ( Craft\UserModel $user = null )
# getGroupPermissionsByUserId()
Returns all of the group permissions a given user has.
View source (opens new window)
Arguments
$userId
(integer (opens new window))
Returns
Signature
public array getGroupPermissionsByUserId ( $userId )