Roundcube Community Forum

News and Announcements => General Discussion => Topic started by: coolatt on March 30, 2010, 08:47:29 AM

Title: how to bypass the login screen
Post by: coolatt on March 30, 2010, 08:47:29 AM
hello all,

I modified the code of roundcube so that the username & password is hardcoded.
problem is that i have to click on the login button. i want the user to have direct access to its emails.

the following are the modifications i have done to hardcode the username & password:
replace
 else if ($_SESSION['temp'] && !empty($_POST['_user']) && !empty($_POST['_pass']) &&
        $RCMAIL->login(trim(get_input_value('_user', RCUBE_INPUT_POST), ' '),
        get_input_value('_pass', RCUBE_INPUT_POST, true, 'ISO-8859-1'), $host)) {
 

by

else if ($RCMAIL->login("me","mypassword",$host)){
can someone help me ?? :(
thanks
Title: how to bypass the login screen
Post by: SKaero on March 30, 2010, 10:39:27 AM
All you need to do is setup the Auto Login plugin /trunk/plugins/autologon/autologon.php ? Roundcube Webmail (http://trac.roundcube.net/browser/trunk/plugins/autologon/autologon.php)
Title: how to bypass the login screen
Post by: coolatt on March 31, 2010, 01:57:16 AM
Quote from: skaero;26486All you need to do is setup the Auto Login plugin /trunk/plugins/autologon/autologon.php ? Roundcube Webmail (http://trac.roundcube.net/browser/trunk/plugins/autologon/autologon.php)

am using RoundCube  Version 0.2.2. is it possible to use the plugin you mentioned ??
:(
Title: how to bypass the login screen
Post by: SKaero on March 31, 2010, 02:06:18 AM
No you would have to upgrade to version 0.3.1.
Title: how to bypass the login screen
Post by: coolatt on March 31, 2010, 05:40:05 AM
Quote from: skaero;26500No you would have to upgrade to version 0.3.1.

Or it is simpler to perform a fresh installation of version 0.3.1 ?

:(
Title: how to bypass the login screen
Post by: SKaero on March 31, 2010, 01:49:16 PM
If you perform a fresh install you will need to re-import all of your contacts again, I'd recommend just doing a upgrade just follow the upgrade instructions http://trac.roundcube.net/wiki/Howto_Upgrade.
Title: how to bypass the login screen
Post by: coolatt on April 01, 2010, 01:16:45 AM
Quote from: skaero;26518If you perform a fresh install you will need to re-import all of your contacts again, I'd recommend just doing a upgrade just follow the upgrade instructions Howto_Upgrade ? Roundcube Webmail (http://trac.roundcube.net/wiki/Howto_Upgrade).

thanks skaero for advice.
but i tried something simpler and it is working.
i added a piece of javascript in login.html so that the form gets automatically submitted.

i got the idea from here:

QuoteHowto: customize your roundcube webmail service in an easy way - Aidam IT-Services Development Blog (http://blog.aidam.de/index.php?/archives/1-Howto-customize-your-roundcube-webmail-service-in-an-easy-way.html)

but the story doesn't end here... i got to do some other code modifications in RoundCube to actually accomplish my project. :(
Title: how to bypass the login screen
Post by: SKaero on April 01, 2010, 02:22:54 AM
I'd recommend upgrading it will be way easier to use the plugin api to do maledictions to RoundCube.