Hello,
I have found the cause of plugin fail. In program/include/rcmail.php: line 450: else if (!empty($config['default_host']) && $host != $config['default_host']) line 451: return false;
If a plugin modifies 'default_host' login is aborted ¿why?
Regards,
Pedro
Pedro R. Benito da Rocha escribió:
Thomas Bruederli escribió:
Pedro R. Benito da Rocha wrote:
Hello,
I'm writting a plugin for select host from user's login, so I have to not show the server box on login form.
If I leave 'default_host' blank at main.inc.php the "Server" box appears, and if I put something on the config variable the plugin does not work, because default host takes precedence over the host selected by the plugin.
Is there a way to hide "server" box on login form without assign a value to "default_host" or I have found a bug on default_host setting?
I don't know how you wrote your plugin but the 'authenticate' should allow you to set the host. Just set any value (e.g. localhost) to the default_host config parameter and then set 'host' in the return value of the 'authenticate' hook. See index.php line 84 how that hook is implemented.
When I leave 'default_host' blank, server box appears in login form but plugin works ok. When I put something on 'default_host' plugin doesn't work, because server tries to connect to 'default_host'.
The plugin is attached, ¿I am doing something wrong?
Thanks,
Pedro
List info: http://lists.roundcube.net/dev/