Constructor & Destructor Documentation
__construct |
( |
$ |
user_id, |
|
|
$ |
fetch_ldap = true , |
|
|
$ |
groups = null |
|
) |
| |
Constructor
- Parameters:
-
string | $user_id | UserID |
bool | $fetch_ldap | If set to true, tries to retrieve LDAP Attributes for the user |
array | $groups | A list of groups (if the attributes are not fetched through LDAP, the list of groups can be specified here) |
Member Function Documentation
Accessor, quickly access the user's preferences
- Returns:
- string
Implements iUser.
Accessor, quickly access the user's attributes using object style syntax
- Returns:
- bool
Implements iUser.
__set |
( |
$ |
attributeName, |
|
|
$ |
value |
|
) |
| |
Accessor, quickly access the user's preferences
Implements iUser.
Accessor, quickly access the user's attributes using object style syntax
- Returns:
- bool
Implements iUser.
Get user attributes from the LDAP database
- Parameters:
-
string | $user_id | Id of the user in the LDAP database |
- Returns:
- array An array of attributes
public
Gets the user access level public
- Returns:
- int
Implements iUser.
Gets an user preference. Returns null if the preference is not set
- Parameters:
-
string | $name | The name of the preference public |
- Returns:
- mixed
Implements iUser.
Returns an array of valid attributes associated with
- Returns:
- array
Implements iUser.
Returns the UserId of the user
- Returns:
- string
Implements iUser.
Check the group membership of an user
- Parameters:
-
string | array | $groups | Either the name of a group or an array of group names against which to check the membership of the user |
bool | $binary_and | If set to true, the user must be a member of ALL the groups in the list, otherwise it must belong to at least one of the groups |
- Returns:
- bool
Implements iUser.
Sets an user preference. To delete a preference from the database, just set the null value for it and set the $db to an instance of mMysql. If you want to delete an array from the database, just put a "%" instead of the index value. For example, to delete the "general/countries" array: $user->set_preference("general/countries/%", null);
- Parameters:
-
string | $name | The preference |
mixed | $value | The value |
mMysql | $db | A database connection (used for saving the preference to the database) [OPTIONAL] public |
- Returns:
- void
Implements iUser.
Field Documentation
$user_preferences = array() [protected] |
The documentation for this class was generated from the following file: