[imp] _imp_hook_vinfo: Where to obtain relevant info from?

Otto Stolz Otto.Stolz at uni-konstanz.de
Fri Sep 15 09:09:07 PDT 2006


Hello,

I am still tryíng to adapt
   Horde: 3.1.2
   Imp: H3 (4.1.2)
to our environment.

In a nutshell:
_imp_hook_vinfo needs both the current IMAP server and the
current user-id, as given by the user in the Imp login screen;
however this information is neither provided as function arguments,
nor in the usual places (i. e. $imp, $_SESSION['imp'], or
Auth::getAuth()). How is this meant to work?

The whole story:

Essential features and requests of our environment:
- there are several IMAP servers with their own respective user
   communities, and features,
- the Imp user shall be able to choose the pertinent IMAP server,
- the user shall be able to log into Imp with a mnemonic user-id,
   derived from their common name (whilst the IMAP user-id is sort
   of a serial number),
- there are LDAP servers available to handle the mapping from
   mnemonic Imp user-id to internal IMAP user-id.

Now, the custom hooks are meant to handle this sort of idio-
syncracies.

After collecting the following pieces of information:
· _imp_hook_vinfo() will be used to set $imp['user'] at login time
    (from: imp/conf/conf.xml),
· $imp['user'] is the IMAP username (from: imp/lib/Session.php),
· is called with either'vdomain' oder 'username' (default)
   and will have to yield the current e-mail-domain, or the
   current IMAP user-id, respectively (my wording, derived from
   the example in: horde/conf/hooks.php.dist),
I have concluded that I should use _imp_hook_vinfo to do the trick.

Now, after coding and activating _imp_hook_vinfo, I cannot log in
to Imp, any more. The reason: To do its job, _imp_hook_vinfo() must
know which IMAP server the user has chosen; however 
isset($_SESSION['imp']['server'])==False
when _imp_hook_vinfo is invoked.

I could try and retrieve the necessary information from
$_GET['server'], instead; but this is sort of cheating
(and I have to make sure that _imp_hook_vinfo is indeed only
called from the Imp login screen -- otherwise that $_GET
component would not be defined).

What should I try next?

Thanks for any hints.

Best wishes,
    Otto Stolz






More information about the imp mailing list