UserPermissionsVariable

Type
Class
Namespace
Craft
Inherits
Craft\UserPermissionsVariable
Since
1.0

User permission functions.

See also http://craftcms.com

View source

Public Methods

MethodDescription
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()

Returns all of the known permissions, sorted by category.

View source

Returns

array

Signature

public array getAllPermissions ( )

getAssignablePermissions()

Returns the permissions that the current user is allowed to assign to another user.

View source

Arguments

  • $user (Craft\UserModel, null) – The recipient of the permissions. If set, their current permissions will be included as well.

Returns

array

Signature

public array getAssignablePermissions ( Craft\UserModel $user = null )

getGroupPermissionsByUserId()

Returns all of the group permissions a given user has.

View source

Arguments

Returns

array

Signature

public array getGroupPermissionsByUserId ( $userId )