[ingo] Choosing backend

Jan Schneider jan at horde.org
Mon Jun 6 03:43:59 PDT 2005


Zitat von alex at milivojevic.org:

> According to mail list archives, Ingo doesn't support multiple backends
> directly.  What I'd like to do is to choose the backend in 
> config/backends.php
> based on the mail server user is authenticated against (I'm using IMP for
> authentication).
>
> Basically something like:
>
> switch ($???) {
> case 'server1':
>   // define backend for server1 here
>   break;
> case 'server2':
>   // define backend for server2 here
>   break;
> // and so on
> default:
>   // failsafe backend
> }
>
> But, I'm missing the "$???" part.  I guess there should be some 
> global variable
> exported by IMP module containing that info (or a function returning 
> it), but I
> haven't been able to find it.

Try if you find what you need in $_SESSION['imp'], but you must 
authenticate through IMP to have this available directly after logging 
in.

> BTW, in archives, I found response from Jan suggesting several workarounds to
> get multiple backends.  One of them was to install several copies of 
> ingo with
> different names.  I also played with that approach (not particulary 
> liked it),
> and found out that apart from Horde's config/registry.php I also 
> needed to edit
> ingo-*/lib/api.php and ingo-*/lib/base.php files changing references 
> to "ingo"
> to the new names.  In case I need to implement something like that in the
> future, are those the only changes needed?  Or is it safer not to play with
> multiple instances of Ingo?

These *should* be the only places.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the ingo mailing list