Documentation

UserGroup
in package

User Group Object

Tags
copyright

CLOUDREXX CMS - CLOUDREXX AG

author

Cloudrexx Development Team info@cloudrexx.com

version
1.0.0
subpackage

lib_framework

Table of Contents

Properties

$EOF  : mixed
$arrAttributes  : mixed
$arrCache  : mixed
$arrDynamicPermissions  : mixed
$arrLoadedGroups  : mixed
$arrStaticPermissions  : mixed
$arrTypes  : mixed
$arrUsers  : array<string|int, mixed>|null|bool
`load()` initializes this as null. `loadUsers()` either returns an array or false.
$defaultType  : mixed
$description  : mixed
$error_msg  : string
Contains the message if an error occurs
$homepage  : mixed
$id  : mixed
$is_active  : mixed
$name  : mixed
$type  : mixed

Methods

__construct()  : mixed
delete()  : bool
Deletes this group from DB
first()  : mixed
Load first group
getActiveStatus()  : mixed
getAssociatedUserIds()  : array<string|int, mixed>|false
Returns a list of user IDs associated to this group
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
loadUsers()  : array<string|int, mixed>
Returns an array of IDs of Users associated with this group
storeUserAssociations()  : bool
Store user associations
clean()  : mixed
load()  : mixed
loadDynamicPermissions()  : mixed
loadGroups()  : mixed
loadPermissions()  : mixed
loadStaticPermissions()  : mixed
parseFilterConditions()  : mixed
storePermissions()  : mixed

Properties

$arrAttributes

private mixed $arrAttributes = array('group_id', 'group_name', 'group_description', 'is_active', 'type', 'homepage')

$arrUsers

`load()` initializes this as null. `loadUsers()` either returns an array or false.

private array<string|int, mixed>|null|bool $arrUsers

List of user IDs or null if not initialized or false on error

$error_msg

Contains the message if an error occurs

private string $error_msg

Methods

delete()

Deletes this group from DB

public delete() : bool

Call $this->getErrorMsg() to get the error message if this returns false.

Return values
bool

True on success, false otherwise

getAssociatedUserIds()

Returns a list of user IDs associated to this group

public getAssociatedUserIds([bool $cache = true ]) : array<string|int, mixed>|false
Parameters
$cache : bool = true

If set to false, does not load from cache nor update it

Return values
array<string|int, mixed>|false

List of user IDs or false on DB error

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

getNameArray()

Returns an array of all available user group names, indexed by their ID

public static getNameArray() : array<string|int, mixed>
Tags
author

Reto Kohli reto.kohli@comvation.com

Return values
array<string|int, mixed>

The user group name array

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
bool

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
see
User
see
User::getUser()

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
global

ADONewConnection

global

array

Return values
bool

True on success, false otherwise

loadUsers()

Returns an array of IDs of Users associated with this group

protected loadUsers() : array<string|int, mixed>
Tags
global

ADOConnection $objDatabase

Return values
array<string|int, mixed>

The array of User IDs on success, false otherwise

storeUserAssociations()

Store user associations

protected storeUserAssociations() : bool

Stores the user associations of the loaded group.

Tags
global

ADONewConnection

throws
Exception

User event listeners might throw exceptions

Return values
bool

True on success, false otherwise

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

parseFilterConditions()

private parseFilterConditions(mixed $arrFilter) : mixed
Parameters
$arrFilter : mixed

        
On this page

Search results