Roundcube Community Forum
Release Support => Pending Issues => Topic started by: Hermiod on February 15, 2012, 03:24:03 PM
-
I have a forum, I am trying to make it in such a way that users only have to login once.
There is a autologin plugin, but it does not work with the new versions of Round Cube.
Is there some kind of integration I can use or some kind of manual way I can login users?
I tried looking at the roundcube php files, but could not find how the cookies get set, if I knew that I could try to do it manually (probably not the best way, might miss some logging functions).
-
Take a look at the sample auto login plugin and adapted it to your needs autologon.php in trunk/plugins/autologon (http://trac.roundcube.net/browser/trunk/plugins/autologon/autologon.php)
-
Take a look at the sample auto login plugin and adapted it to your needs autologon.php in trunk/plugins/autologon (http://trac.roundcube.net/browser/trunk/plugins/autologon/autologon.php)
I have activated that plugin in main.inc, how am I supposed to access that class?
I tried creating a php file in the main webmail folder, then added the start of index.php:
require_once 'program/include/iniset.php';
$RCMAIL = rcmail::get_instance();
$startup = $RCMAIL->plugins->exec_hook('startup', array('task' => $RCMAIL->task, 'action' => $RCMAIL->action));
$RCMAIL->set_task($startup['task']);
$RCMAIL->action = $startup['action'];
then created a object of the autologon.php class:
$login_attempt = new autologon();
But it fails, keeps saying:
Warning: Missing argument 1 for rcube_plugin::__construct(), called in /.../webmail/autologon.php on line 55 and defined in /.../webmail/program/include/rcube_plugin.php on line 74
After that I thought to then executed the init, startup and authenticate methods on the created object.
I did edit the autologon.php file for now to allow external access and only allow one specific account to be used(user/pw).
What am I doing wrong?
-
All you need to do is add "autologon" to the plugins array in the /config/main.inc.php for full details read: Doc_Plugins (http://trac.roundcube.net/wiki/Doc_Plugins#InstallingPluginsandActivatingPlugins)
-
I already did that:
$rcmail_config['plugins'] = array('autologon');
-
What do you have in you autologon.php file?
-
What do you have in you autologon.php file?
I have the default file with two modifications:
1) Manually set the username and password in function authenticate() [for testing purposes]
2) Modified the code to not check if is_localhost()
-
I finally made that. Check it out in my gist. https://gist.github.com/TeeBSD/8610622