Re: leaf through users

Lukas Kahwe Smith <[email protected]> Sun, 05 Feb 2006 11:31:59 +0100
Newsgroups gmane.comp.php.pear.liveuser
Message-ID <[email protected]>
Matthias Nothhaft wrote:
> Hi,
> 
> I would like to view an edit form with data from user X and prev/next
> buttons.
> 
> The admin user who is currently logged may only see/edit users with
> perm_type <= current user
> 
> I have a 'createtime' in the auth_users table and want to get the
> prev/next IDs by comparing this time with the current record.
> 
> I tried to getUsers() but without success... :-(
> 
> $filter = array(
>     'auth_container_name' => $this->_authContainer,
>     'perm_type' => array('op' => '<=', 'value' => $current_perm_type,
>     'createtime' => array('op' => '>' 'value' => $user['createtime']
> );
> 
> This gives me: Couldn't create the query, reason: not all fields
> (createtime) could be linked to a table (perm_users, userrights, rights,
> groupusers)
> 
> If I try the 'auth' container I cannot filter by 'perm_type'.
> 
> 
> Is there a chance to get it work with LiveUser or should I write my own
> queries for this purpose? ;-)

the clean solution would be to move the createtime to the 
liveusers_perm_users table if possible

the only way would be to make the liveuser_users table available in the 
perm backend, by adding it as a new table in the perm storage config. 
you would also have to add liveuser_users to the selectable tables for 
the methods you want it to be available.

regards,
Lukas