Class: user
Source Location: Program_Root/classes/obliquid/user.php
Main class for user module.
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
[line 29]
Main class for user module.
Class Methods
method addGroup [line 42]
integer addGroup(
array
$groupname, array
$description, [boolean
$is_role = false])
|
|
Adds a new group.
groupname and descriptions are associative array to support multiple languages, before being saved in database they are serialized and base64 encoded.
Tags:
Parameters:
method addUserGroup [line 579]
void addUserGroup(
integer
$id_person, integer
$id_group)
|
|
Add a group to a user
Parameters:
method canViewUser [line 512]
true canViewUser(
integer
$id_person)
|
|
Check for authorization to view a person. A person can be viewed if belongs to at least one of the groups we're allowed to see.
Tags:
Parameters:
method delete [line 551]
true delete(
integer
$id_person)
|
|
Delete a user
Tags:
Parameters:
method deleteUserGroup [line 595]
void deleteUserGroup(
integer
$id_person, integer
$id_group)
|
|
Delete a group from a user
Parameters:
method delGroup [line 101]
boolean delGroup(
integer
$id_group)
|
|
Deletes an existing group.
if the group has members, the memberships are removed (not the members) if the group has associated operations, those associations are removed if the group has associated roles, those associations are removed
Tags:
Parameters:
method ensure_has [line 395]
boolean ensure_has(
string
$a, string
$b, string
$c, string
$t)
|
|
Checks to see if the requested security object has some access defined.
If nobody has access, then an entry is created, and access is given to the group of the individual current running. Typically, this would be used when creating a restricted table entry so that somebody can get to it.
Tags:
Parameters:
method getUsers [line 486]
array &getUsers(
[integer
$id_group = 0])
|
|
Returns a list of users of a group
Tags:
Parameters:
method groupIds [line 198]
string groupIds(
integer
$id_person)
|
|
Returns a comma separated list of group ids, given a id_person
Tags:
Parameters:
method groupIdToNames [line 180]
text groupIdToNames(
text
$groupIds)
|
|
Returns a comma separated list of group names in the current language,
given a comma separated list of groupIds
Tags:
Parameters:
method groupInfo [line 150]
boolean groupInfo(
integer
$id_group, text
&$groupname, mixed
&$groupdesc, text
$description)
|
|
Returns information about an existing group in the current language.
Special group Ids: ** Everyone, u0 Not signed on, g* Signed on
Tags:
Parameters:
method has [line 376]
boolean has(
$id_module
$id_module, $name
$name, [mixed
$c = ""])
|
|
Checks if a user has a given operation.
Tags:
Parameters:
method hasGroup [line 536]
true hasGroup(
integer
$id_person, integer
$id_group)
|
|
Check if a certain user belongs to a certain group
Tags:
Parameters:
method listGroups [line 223]
array &listGroups(
[mixed
$get = "G"], text
$gets)
|
|
Lists available groups in associative array.
returns an index array of available groups, each element of the array is an associative array with keys id_group, groupname, description. groupname and description are returned in the current language if they are available, otherwise in another language according to site priorities. The array is sorted in order of groupname. Only groups allowed to be viewed by the current user are returned.
Tags:
Parameters:
method listGroupsForSelect [line 267]
array &listGroupsForSelect(
[mixed
$get = "G"], text
$gets)
|
|
Lists available groups in index array suitable for db_form::getSelect() returns an index array of available groups, each element of the array is an index array with id_group in position 0 and groupname in position 1.
groupname and description are returned in the current language if they are available, otherwise in another language according to site priorities. The array is sorted in order of groupname. Only groups allowed to be viewed by the current user are returned.
Tags:
Parameters:
method listUserGroups [line 286]
array &listUserGroups(
integer
$id_person)
|
|
Lists groups to which the user belongs
returns an index array of groups of a person, each element of the array is an associative array with keys id_group, groupname, description groupname and description are returned in the current language if they are available, otherwise in another language according to site priorities the array is sorted in order of groupname.
Tags:
Parameters:
method loadRole [line 423]
integer loadRole(
$filename
$filename, [$id_group
$id_group = 0], [$id_security
$id_security = 0])
|
|
Loads a role from a role definition file
Tags:
Parameters:
method modGroup [line 73]
boolean modGroup(
integer
$id_group, array
$groupname, array
$description, [mixed
$is_role = 0], integer
$id_role)
|
|
Modifies an existing group.
Tags:
Parameters:
method peekHas [line 323]
boolean peekHas(
mixed
$a, mixed
$b, mixed
$c, [mixed
$p = 0])
|
|
Checks the authorization to a security object for any person.
If no person Id is supplied, it checks the current user. NOTE: this does not cache the result if the person ID is supplied, so it is not recommended that it be used to check authorization for the logged on user by user Id. This function is in user instead of obliquidweb because it should not be used frequently.
Tags:
method readGroup [line 130]
boolean readGroup(
integer
$id_group, array
&$groupname, array
&$description)
|
|
Returns information about an existing group as assoc arrays.
groupnames and descriptions are returned by reference as associative array with locales as keys.
Tags:
Parameters:
|