Roundcube Community Forum


logging in to roundcube from main site

Started by Adam, August 19, 2006, 09:20:25 AM

Previous topic - Next topic



Can anyone point me in the right direction? I would like users on one of my sites to be able to log in from the main site rather than going to the roundcube login page. Is this possible? I'm sure it is, I'm just not sure how! ::)

I'm assuming that somehow I need to incorporate this bit of code from login.html


" />

Any help appreciated!




I edited the login.html template - I thought it was going to be much more complicated thant it was!!



I'm looking for the same function
I try by adress:
but it didn't work
so I try this one:
but it didn't work
so I try to edit index.php to change $_POST into $_GET
but it didn't work
I'm still searching a solution ... :ticked:


this sure would be some interesting feature. I am using it like this on my actual instalation.
Users log in to my slight modified Joomla mainpage, when clicking on webmail the horde/imp webmail opens without needing user/password. If not logged in they are redirected to the joomla mainpage.

But there is NO WAY I am going to use it like this:

this would be insane to have all passwords in some logfiles, or worse, in the browser history


I would be very interested by the capability to log in only once when I was in my main site.
I believe I found a beginning of a way with :
(Integration of the RoundCube Webmail in Drupal ... use of a single-sign-on)

But like the RoundCube code, it's is a very complicated code for me ...  :'(

If anyone has any solution for a single-sign-on ... ! (but avoid the password in the URL... ;) )

Thanx all


Do you mean a login for on a site where your users will enter their username password n go to the inbox? or you want the login be syncronized with a CMS or a forum??

If you are looking for a solution to the first Q then there u go

<form name=&quot;login&quot; action=&quot;[url];[/url] method=&quot;post&quot; target=&quot;_blank&quot;>
<input type=&quot;text&quot; name=&quot;_user&quot; >
<input type=&quot;password&quot; name=&quot;_pass&quot; >
<input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Login&quot; class=&quot;submit&quot;>
<input name=&quot;_action&quot; value=&quot;login&quot; type=&quot;hidden&quot;>

Note the following.-
- edit the action="" to target to your index.php file
- target="_blank" will open roundcube in a NEW WINDOW (remove it, if you want it to open in the same window)
- If you use the new window option, use a small javascript to clear the text boxes from the main page!


I tried adding the form post to the front page of my website but all I get is "Your browser does not except cookies" when it goes to the roundcube page. It keeps the user name and the cursor is in the password field. Can anyone help me out?


I have another post (that was asked a little bit more recently that this one) a few items down on how to do this. If somebody is already logged into your existing site and you want to use those same credentials to bypass the roundcube logon, my method is working good for us. The bad part is it requires javascript but your end users do not have to see a form or hit another submit button. I believe this is the post

Your problem sounds like your browser has cookies disabled and you need to enable them. If you do not know what cookies are this can help.

Pretty much all browsers have a setting somewhere to enable and disable cookies. The form you added does nothing with cookies so what you are seeing is from your code.


Thanks, I did this:
Quote from: minoan Id did this:
// try to log in
if ($_action=='login' && $_task=='mail')
 $host = rcmail_autoselect_host();
 // check if client supports cookies
 //if (empty($_COOKIE))
  //show_message(&quot;cookiesdisabled&quot;, 'warning');
  if (isset($_POST['_user']) && isset($_POST['_pass']) &&
      rcmail_login(get_input_value('_user', RCUBE_INPUT_POST),
       get_input_value('_pass', RCUBE_INPUT_POST, true, 'ISO-8859-1'), $host))
  // send redirect
  header(&quot;Location: $COMM_PATH&quot;);
  show_message(&quot;loginfailed&quot;, 'warning');
  $_SESSION['user_id'] = '';
Now works perfect but it doesn't check for the cookie! I think that is not something which is needed!
and now I don't get the error.


I had the same problem, but i don't change anything in the code of rc.
I just put some cookie on my main page. when i try to login to rc, he check is there any cookie, and find my...