[horde] Creating users with horde

Cristian Livadaru drac3+ho at vampirenet.ro
Wed Jan 26 15:07:11 PST 2005


Quoting Jan Schneider <jan at horde.org>:

> Zitat von Cristian Livadaru <drac3+ho at vampirenet.ro>:
>
>> me again, I tried to check the source to see what hapens and how horde
>> lists the
>> users, but I don't understand everything.
>> If I am right then the routine for listing users should be in
>> /lib/Horde/Auth/cyrus.php
>
> You never said that you use the Cyrus authentication driver.

oops, sorry thought I did so.
well since I realy want to get this working I found out that the routine that
sould list all users is this ( from /lib/Horde/IMAP/Admin.php )

    function listMailboxes()
    {
        if (is_a($imap = $this->_connect(), 'PEAR_Error')) {
            return $imap;
        }

        $list = @imap_list($imap, $this->_ref, $this->_params['userhierarchy'] .
'%');
        if (!$list) {
            return array();
        }
        return preg_replace('/.*' . preg_quote($this->_params['userhierarchy'],
'/') . '(.*)/', '\\1', $list);

the firs testuser that was created ( a long time ago ) is being displayed:

user/dtest (\HasNoChildren) ( this is the cyradm output )
the rest of the users look a bit different

user/foo at domain.name

So it looks like I get only users without the @ after the usernames
I extendet the listMailboxes routine with one of my virtual domains:

$list = @imap_list($imap, $this->_ref, $this->_params['userhierarchy'] .
'%@vampirenet.ro');

and it works, but I have more domains the question is how I should change the
search so I could get all domains.
If I replace the % with a * then I get all users but also all mailboxes ( which
I don't realy want )

Enough for today.




More information about the horde mailing list