I try to make autologin to my roundcube.
But I get "Invalid Request" when I enter
https://mydomain.com/?_autologin=1&uid=dsassad&auth=jkhsdajkAny idea why it won't login?
I use version 0.5.1
<?php
class ivologon extends rcube_plugin
{
public $task = 'login';
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
if (empty($_SESSION['user_id']) && !empty($_GET['_autologin']))
$args['action'] = 'login';
return $args;
}
function authenticate($args)
{
if (!empty($_GET['_autologin']) && !empty($_GET['uid']) && !empty($_GET['auth'])) {
$args['user'] = 'e@mail.com';
$args['pass'] = '***';
}
return $args;
}
}
?>