View Single Post
  #17  
Old 21st May 2010, 18:32
Grey Grey is offline
Member
 
Join Date: May 2008
Location: Germany
Posts: 70
Thanks: 9
Thanked 18 Times in 15 Posts
Default

After quite a good time messing around with RC code, I found a solution. One problem remains, though, that is a bit unpleasant:

I got it working to "auto-select" the mailhost according to the username given (aka email-adress). That was possible doing with a simple plugin and api hooks. Nice. BUT:

It seems RC gets a bit angry if you write "anything" into it's "default_host" configuration field. I tried setting it to 'none' or 'ispc-controlled' to symbolize, that no hostname will be given but instead the plugin will do the work. Problem is, that RC takes this value above all others (as it seems) and even ignores the values my plugin was setting while logging in. If you change it to '' (empty string) it works! But instead now it shows the server-input field, that I tried to avoid.

So my solution isn't that shiny as I thought it would be. It merely consists of two parts:

1) Small & simple plugin that does the dirty-work in background, selecting the server with a double SELECT sql statement like Till suggested.

2) I simply hacked around in RCs intestines By modifying "./program/include/rcube_template.php" at about line 1046-1048, I set the server fields to hidden so they won't show up in the login screen.

1) is - I think - upgradeable without big problems to new RC versions.
2) has to be done again if you install a new version of RC.


If that is acceptable, would someone (probably Hans as it was his request originally and he has the required setup) be able to test that thing with me? I don't have a real multi-server-environment, so I have to guess it works as I'm now able to login without a server set anywhere (so it must be read out of the database).

Greets
Jens
Reply With Quote