Hi all,
I have tried and simplified the autologon plugin... but I have this problem.
When RC starts ... tried to open the inbox ... but after few seconds .. I received the cookie browser error.
If I use RC without the plugin .. and enter the user+pass+host manually ... work fine.
Where I wrong ?
This is the browser error:
This page is not redirecting properly
Firefox has detected that the server is redirecting the request for this page so that it can never be completed.
* This problem is often caused by the blocking or rejection of cookies.
this is the autologon code:
class autologon extends rcube_plugin
{
function init()
{
$this->add_hook('startup', array($this, 'startup'));
$this->add_hook('authenticate', array($this, 'authenticate'));
}
function startup($args)
{
$rcmail = rcmail::get_instance();
// change action to login
$args['action'] = 'login';
return $args;
}
function authenticate($args)
{
$args['user'] = 'myusername';
$args['pass'] = 'mypassword';
$args['host'] = 'hostname';
return $args;
}
}
looks like you simplified the autologin plugin a little to much. the startup hook is called everytime roundcube loads (that is every time a page loads etc) and everytime you are overriding the action and setting it to login. you need to put at least this back in your startup function:
if (empty($args['action']) && empty($_SESSION['user_id']))
great!, thanks...
I commented that line. :D
Antonello