UserGroup
in package
User Group Object
Tags
Table of Contents
Properties
- $EOF : mixed
- $arrAttributes : mixed
- $arrCache : mixed
- $arrDynamicPermissions : mixed
- $arrLoadedGroups : mixed
- $arrStaticPermissions : mixed
- $arrTypes : mixed
- $arrUsers : mixed
- $defaultType : mixed
- $description : mixed
- $error_msg : unknown_type
- Contains the message if an error occurs
- $homepage : mixed
- $id : mixed
- $is_active : mixed
- $name : mixed
- $type : mixed
Methods
- __construct() : mixed
- delete() : mixed
- first() : mixed
- Load first group
- getActiveStatus() : mixed
- getAssociatedUserIds() : mixed
- getDescription() : mixed
- getDynamicPermissionIds() : mixed
- getErrorMsg() : mixed
- getGroup() : UserGroup
- Returns the UserGroup for the given ID
- getGroupCount() : mixed
- getGroups() : mixed
- getHomepage() : mixed
- getId() : mixed
- getLoadedGroupCount() : mixed
- getLoadedGroupIds() : mixed
- getName() : mixed
- getNameArray() : array<string|int, mixed>
- Returns an array of all available user group names, indexed by their ID
- getStaticPermissionIds() : mixed
- getType() : mixed
- getTypes() : mixed
- getUserCount() : mixed
- isUniqueGroupName() : bool
- Is unique group name
- isValidGroupName() : mixed
- next() : mixed
- Load next group
- setActiveStatus() : mixed
- setDescription() : mixed
- setDynamicPermissionIds() : mixed
- setHomepage() : mixed
- setName() : mixed
- setStaticPermissionIds() : mixed
- setType() : mixed
- setUsers() : void
- Set ID's of users which should belong to this group
- store() : bool
- Store user account
- clean() : mixed
- load() : mixed
- loadDynamicPermissions() : mixed
- loadGroups() : mixed
- loadPermissions() : mixed
- loadStaticPermissions() : mixed
- loadUsers() : array<string|int, mixed>
- Returns an array of IDs of Users associated with this group
- parseFilterConditions() : mixed
- storePermissions() : mixed
- storeUserAssociations() : bool
- Store user associations
Properties
$EOF
public
mixed
$EOF
$arrAttributes
private
mixed
$arrAttributes
= array('group_id', 'group_name', 'group_description', 'is_active', 'type', 'homepage')
$arrCache
private
mixed
$arrCache
= array()
$arrDynamicPermissions
private
mixed
$arrDynamicPermissions
$arrLoadedGroups
private
mixed
$arrLoadedGroups
= array()
$arrStaticPermissions
private
mixed
$arrStaticPermissions
$arrTypes
private
mixed
$arrTypes
= array('frontend', 'backend')
$arrUsers
private
mixed
$arrUsers
$defaultType
private
mixed
$defaultType
= 'frontend'
$description
private
mixed
$description
$error_msg
Contains the message if an error occurs
private
unknown_type
$error_msg
$homepage
private
mixed
$homepage
$id
private
mixed
$id
$is_active
private
mixed
$is_active
$name
private
mixed
$name
$type
private
mixed
$type
Methods
__construct()
public
__construct() : mixed
delete()
public
delete() : mixed
first()
Load first group
public
first() : mixed
getActiveStatus()
public
getActiveStatus() : mixed
getAssociatedUserIds()
public
getAssociatedUserIds() : mixed
getDescription()
public
getDescription() : mixed
getDynamicPermissionIds()
public
getDynamicPermissionIds() : mixed
getErrorMsg()
public
getErrorMsg() : mixed
getGroup()
Returns the UserGroup for the given ID
public
getGroup(int $id) : UserGroup
Parameters
- $id : int
-
The UserGroup ID
Return values
UserGroup —The Group on success, false(?) otherwise
getGroupCount()
public
getGroupCount([mixed $arrFilter = null ]) : mixed
Parameters
- $arrFilter : mixed = null
getGroups()
public
getGroups([mixed $filter = null ][, mixed $arrSort = null ][, mixed $arrAttributes = null ][, mixed $limit = null ][, mixed $offset = 0 ]) : mixed
Parameters
- $filter : mixed = null
- $arrSort : mixed = null
- $arrAttributes : mixed = null
- $limit : mixed = null
- $offset : mixed = 0
getHomepage()
public
getHomepage() : mixed
getId()
public
getId() : mixed
getLoadedGroupCount()
public
getLoadedGroupCount() : mixed
getLoadedGroupIds()
public
getLoadedGroupIds() : mixed
getName()
public
getName() : mixed
getNameArray()
Returns an array of all available user group names, indexed by their ID
public
static getNameArray() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —The user group name array
getStaticPermissionIds()
public
getStaticPermissionIds() : mixed
getType()
public
getType() : mixed
getTypes()
public
getTypes() : mixed
getUserCount()
public
getUserCount([mixed $onlyActive = false ]) : mixed
Parameters
- $onlyActive : mixed = false
isUniqueGroupName()
Is unique group name
public
isUniqueGroupName() : bool
Checks if the group name specified by $name is unique in the system.
Return values
boolisValidGroupName()
public
isValidGroupName() : mixed
next()
Load next group
public
next() : mixed
setActiveStatus()
public
setActiveStatus(mixed $status) : mixed
Parameters
- $status : mixed
setDescription()
public
setDescription(mixed $description) : mixed
Parameters
- $description : mixed
setDynamicPermissionIds()
public
setDynamicPermissionIds(mixed $arrPermissionIds) : mixed
Parameters
- $arrPermissionIds : mixed
setHomepage()
public
setHomepage(mixed $homepage) : mixed
Parameters
- $homepage : mixed
setName()
public
setName(mixed $name) : mixed
Parameters
- $name : mixed
setStaticPermissionIds()
public
setStaticPermissionIds(mixed $arrPermissionIds) : mixed
Parameters
- $arrPermissionIds : mixed
setType()
public
setType(mixed $type) : mixed
Parameters
- $type : mixed
setUsers()
Set ID's of users which should belong to this group
public
setUsers(array<string|int, mixed> $arrUsers) : void
Parameters
- $arrUsers : array<string|int, mixed>
Tags
store()
Store user account
public
store() : bool
This stores the metadata of the user, which includes the username, password, email, language ID, activ status and the administration status, to the database. If it is a new user, it also sets the registration time to the current time.
Tags
Return values
boolclean()
private
clean() : mixed
load()
private
load(mixed $id) : mixed
Parameters
- $id : mixed
loadDynamicPermissions()
private
loadDynamicPermissions() : mixed
loadGroups()
private
loadGroups([mixed $filter = null ][, mixed $arrSort = null ][, mixed $arrAttributes = null ][, mixed $limit = null ][, mixed $offset = 0 ]) : mixed
Parameters
- $filter : mixed = null
- $arrSort : mixed = null
- $arrAttributes : mixed = null
- $limit : mixed = null
- $offset : mixed = 0
loadPermissions()
private
loadPermissions(mixed $type) : mixed
Parameters
- $type : mixed
loadStaticPermissions()
private
loadStaticPermissions() : mixed
loadUsers()
Returns an array of IDs of Users associated with this group
private
loadUsers() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —The array of User IDs on success, false otherwise
parseFilterConditions()
private
parseFilterConditions(mixed $arrFilter) : mixed
Parameters
- $arrFilter : mixed
storePermissions()
private
storePermissions() : mixed
storeUserAssociations()
Store user associations
private
storeUserAssociations() : bool
Stores the user associations of the loaded group. Returns TRUE no success, FALSE on failure.