Horde_Auth_Sql::listUsers PHP Method

listUsers() public method

List all users in the system.
public listUsers ( boolean $sort = false ) : array
$sort boolean Sort the users?
return array The array of userIds.
    public function listUsers($sort = false)
    {
        /* Build the SQL query. */
        $query = sprintf('SELECT %s FROM %s', $this->_params['username_field'], $this->_params['table']);
        if ($sort) {
            $query .= sprintf(' ORDER BY %s ASC', $this->_params['username_field']);
        }
        try {
            return $this->_db->selectValues($query);
        } catch (Horde_Db_Exception $e) {
            throw new Horde_Auth_Exception($e);
        }
    }