/** * Fetches users * * @param array containing key-value pairs for: * 'fields' - ordered array containing the fields to fetch * if empty all fields from the user table are fetched * 'filters' - key values pairs (value may be a string or an array) * 'orders' - key value pairs (values 'ASC' or 'DESC') * 'rekey' - if set to true, returned array will have the * first column as its first dimension * 'group' - if set to true and $rekey is set to true, then * all values with the same first column will be * wrapped in an array * 'limit' - number of rows to select * 'offset' - first row to select * 'select' - determines what query method to use: * 'one' -> queryOne, 'row' -> queryRow, * 'col' -> queryCol, 'all' ->queryAll (default) * 'selectable_tables' - array list of tables that may be * joined to in this query, the first element is * the root table from which the joins are done * @return bool|array false on failure or array with selected data * * @access public */ function getUsers($params = array()) { $selectable_tables = array(); if (array_key_exists('selectable_tables', $params)) { $selectable_tables = $params['selectable_tables']; } elseif (array_key_exists('getUsers', $this->selectable_tables)) { $selectable_tables = $this->selectable_tables['getUsers']; } $root_table = reset($selectable_tables); $params = LiveUser_Admin_Storage::setSelectDefaultParams($params); return $this->_storage->select($params['select'], $params['fields'], $params['filters'], $params['orders'], $params['rekey'], $params['group'], $params['limit'], $params['offset'], $root_table, $selectable_tables); }