models / permissions_model.php
PermissionsModel
Model
Group and user permissions model.
public
check_permission
(
permission, userid
)
public
check_permission
(
permission, userid
)
Check if user has a permission. Return the first found permission or FALSE if none can be found.
Parameters
permission |
|
userid |
Returns
permission
public
get_group_permissions
(
id
)
public
get_group_permissions
(
id
)
Get group permissions from group ID.
Parameters
id |
Returns
permissions
public
get_user_groups
(
id
)
public
get_user_groups
(
id
)
Get names of groups user ID is in.
Parameters
id |
Returns
group_names
public
get_user_permissions
(
id
)
public
get_user_permissions
(
id
)
Determine the permissions for the user ID. This is the most liberal set of permissions when combined with the groups they are in.
Parameters
id |
Returns
permissions