$liveuserConfig = array(
'authContainers' => array(0 => array(
'type' => 'XML',
'file' => 'Auth_XML.xml',
'loginTimeout' => 0,
'expireTime' => 3600,
'idleTime' => 1800,
'allowDuplicateHandles' => false,
'passwordEncryptionMode' => 'MD5'
)
)
);
require_once 'LiveUser.php';
$liveuser = LiveUser::singleton($liveuserConfig);
if (is_array($liveuser)) {
echo 'It was impossible to initiate the object. The following errors occured';
var_export($liveuser);
exit();
} elseif (!$liveuser) {
die('An unknown error occurred');
}
$liveuser->init();
function getUsers($fields, $filters, $order, $rekey, $limit, $offset)
{
// base table on which to execute the query
$select_tables = array('users');
// entity tables allowed to be included in the join
// (not including tables that simply model the relation
// (like groupUsers) which are defined in the relevant
// tables definition as possible join paths
$tables = array('users', 'groups');
// $this->backend is one of: DB, MDB, MDB2, XML etc
$sql =& new LiveUser_SQL($this->_storage);
// set limit
$sql->setLimit($limit, $offset);
// determines which tables need to be joined, which
// columns to fetch and contructs the where statement
$sql->generateSelect($select_tables, $tables, $fields, $filters, $order);
// executes the query, and fetches the result array and
// rekey's the first column to the first array dimension if needed
return $sql->executeSelect($rekey);
}
Observers have