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

Returns all of the known permissions, sorted by category.

View source (opens new window)

Returns

array (opens new window)

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

Returns

array (opens new window)

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

Returns

array (opens new window)

Signature

public array getGroupPermissionsByUserId ( $userId )