Quoting Alvaro Uría <[EMAIL PROTECTED]>:

> First of all, I'm very new to Horde-IMP administration, so feel free to
> point me to some documentation (though I've checked some of it, most of
> the official one, and faqs).
>
> What I would like to know is if I can rewrite "imapuser" after
> authenticating to an IMAP server.
>
> I mean, I log in with a "user" and a "password", that can be authenticated,
> and I would like to change that "user" with the full address returned by
> the IMAP server ("[EMAIL PROTECTED]", or "[EMAIL PROTECTED]", etc.)
>
> I've been looking for vinfo hooks, but I think this is thought for being
> used before any authentication, (and to change $_SESSION["imp"]["user"]).
>
> I've also been looking for IMAP functions on PHP and I haven't seen anyone
> like "imap_get_username" or so (maybe that can't be done).

No, it's not part of the imap protocol unless there's an extension I'm  
not familiar with. How does your imap server "return the full address"?

> The database being checked by IMAP has 4 fields (amongst others):
>       - adresss (which has "[EMAIL PROTECTED]")
>       - password
>       - username
>       - maildir
>       - ...
>
> ...and I usually authenticate using "username" and "password", but I need
> Horde to know the "address" for not using a default domain when sending
> emails, etc. (BTW, I can also use "address" and "password" for
> authentication, but it's more... handy to use the "username" only. I tell
> you that because it's not a problem once the "imapuser" has been changed
> just after logging in if it's used to authenticate again)

You can consult that database from within preference hooks, or using  
_horde_hook_postauthenticate. Those are both described in  
horde/config/hooks.php.dist and in the wiki.

-chuck
-- 
IMP mailing list - Join the hunt: http://horde.org/bounties/#imp
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [EMAIL PROTECTED]

Reply via email to