void LiveUser_Admin_Auth_Container_MDB2(
array
&$connectOptions, [
$name = null])
|
|
Constructor
The second parameters expects an array containing the parameters for the given container.
This class expects only the array containing configuration options of the auth container you wish to administrate. This is done in case you have several MDB2 based auth containers.
See PEAR::MDB2 documentation for DSN specifications.
Parameters:
mixed getUsers(
[array
$filters = array()], [string
$order = null], [boolean
$rekey = false])
|
|
Gets all users with handle, passwd, auth_user_id lastlogin, is_active and individual rights.
The array will look like this: $userData[0]['auth_user_id'] = 'wujha433gawefawfwfiuj2ou9823r98h';
['handle'] = 'myLogin';
['passwd'] = 'd346gs2gwaeiuhaeiuuweijfjuwaefhj';
['lastlogin'] = 1254801292; (Unix timestamp)
['is_active'] = 1; (1 = yes, 0 = no)
['owner_user_id'] = 1;
['owner_group_id'] = 1;
Filters can be either complex or simple.
In their simple form you just need to pass an associative array with key/value, the key will be the table field name and value the value you are searching. It will consider that you want an do to do a field=value comparison, every additional filter will be appended with AND
The complicated form of filters is to pass an array such as
array( 'fieldname' => array('op' => '>', 'value' => 'dummy', 'cond' => '', type = 'text'), 'fieldname' => array('op' => '<', 'value' => 'dummy2', 'cond' => 'OR', 'type' = 'text'), );
It can then build relatively complex queries. If you need joins or more complicated queries than that please consider using an alternative solution such as PEAR::DB_DataObject
Any aditional field will be returned. The array key will be of the same case it is given.
$cols = array( array('name' => 'myField', 'type' => 'text'), );
e.g.: getUsers(null, $cols) will return
$userData[0]['auth_user_id'] = 'wujha433gawefawfwfiuj2ou9823r98h';
['handle'] = 'myLogin';
['passwd'] = 'd346gs2gwaeiuhaeiuuweijfjuwaefhj';
['myField'] = 'value';
Overrides
LiveUser_Admin_Auth_Common::getUsers() (Gets all users with handle, passwd, authId, lastlogin, is_active and individual rights.)
Parameters: