Méthode |
Description |
|
__construct ( ) |
Class constructor. Defines the related database table name. |
|
cleanUserRoles ( ) |
Enforce integrity between users and roles. |
|
clearCache ( ) |
Clear the roles cache. |
|
define ( $Values ) |
Define a role. |
|
delete ( $where = [], $options = [] ) |
|
|
deleteAndReplace ( integer $roleID, integer $newRoleID ) : boolean |
Delete a role. |
|
deleteID ( integer $roleID, array $options = [] ) : boolean |
Delete a role. |
|
filterPersonalInfo ( $Role ) : boolean |
Use with array_filter to remove PersonalInfo roles. |
|
get ( $OrderFields = '', $OrderDirection = 'asc', $Limit = false, $PageNumber = false ) |
Returns a resultset of all roles. |
|
getAllDefaultRoles ( ) : array |
Get the default role IDs for all types of roles. |
|
getApplicantCount ( boolean $Force = false ) : integer |
Get the current number of applicants waiting to be approved. |
|
getArray ( ) : array |
Returns an array of RoleID => RoleName pairs. |
|
getAssignable ( ) : array |
Get the roles that the current user is allowed to assign to another user. |
|
getByName ( array | string $Names, &$Missing = null ) |
Get a role by name. |
|
getByNotRoleID ( $RoleID ) |
Returns a resultset of role data NOT related to the specified RoleID. |
|
getByPermission ( $Permission ) |
Retrieves all roles with the specified permission(s). |
|
getByRoleID ( $RoleID ) |
Returns a resultset of role data related to the specified RoleID. |
|
getByType ( string $type ) : Gdn_DataSet |
Return all roles matching a specific type. |
|
getByUserID ( integer $userID ) : Gdn_DataSet |
Get the roles for a user. |
|
getCategoryPermissions ( integer $roleID ) : array |
Get the category specific permissions for a role. |
|
getDefaultRoles ( string $type ) : array |
Get the default role IDs for a type of role. |
|
getDefaultTypes ( boolean $translate = true ) : array |
Get an array of default role types. |
|
getPermissions ( integer | array $RoleID ) : array |
Get the permissions for one or more roles. |
|
getPublicUserRoles ( $userID, string $field = "Name" ) : array | null | void |
Get a list of a user's roles that are permitted to be seen. |
|
getUserCount ( $RoleID, $UsersOnlyWithThisRole = false ) |
Returns the number of users assigned to the provided RoleID. If
$UsersOnlyWithThisRole is TRUE, it will return the number of users who
are assigned to this RoleID and NO OTHER. |
|
getWithRankPermissions ( ) : Gdn_DataSet |
Get all of the roles including their ranking permissions. |
|
roles ( null $RoleID = null, boolean $Force = false ) : array | mixed | null | type |
|
|
save ( array $FormPostValues, array | false $Settings = false ) : boolean | mixed |
Save role data. |
|
setUserRoles ( &$Users, string $UserIDColumn = 'UserID', string $RolesColumn = 'Roles' ) |
|
|