GUIDE User Permissions
Andy Rixon edited this page Jan 9, 2018
·
1 revision
Permissions are used to prevent or allow features to be access by any usergroup throughout the forum. Including the ACP.
Checks if the user has a certain permission in their usergroup.
$LAYER->perm->check('permission_name' = string)
Returns true
if user has permission and false
if user does not have the permission.
$LAYER->perm->create('permission_name' = string)
It will return false
if there is any error, and true
if permission is created successfully.
$LAYER->perm->perm('permission_id' = int)
It will return an array if the permission id is valid. False if otherwise.
$LAYER->user->givePermission('user_id' = int, 'permission_name' = string)
It will return false if the user id or permission name is invalid. True if functions correctly.
$LAYER->user->removeAddPermission('user_id' = int, 'permission_name' = string)
It will return false of user id or permission name is invalid. True if functions correctly.