On Wed, 1 Apr 2009 10:42:08 +0100, "Mahmoud M'HIRI" mahmoud.mhiri@gmail.com wrote:
Hello,
I installed RoundCube and it's working perfectly. Besides, I want that users of our extranet get into their inboxes directly from a link in our collaboration platform, so how can I send a request to rcube so it logs users directly without asking for login/pwd.
PS: I'm aware that I have to store IMAP login/pwd for each user in my collaboration platform database.
Thanks in advance,
Best Regards
Change index.php per the following patch, then you should then be able to login with a URL like:
http://yoursite.com/webmailpath/?_action=login&_timezone=<someoffset>&_user=<username>&_pass=<password>
diff --git a/roundcubemail/index.php b/roundcubemail/index.php index 0d0da40..6817e71 100644 --- a/roundcubemail/index.php +++ b/roundcubemail/index.php @@ -82,9 +82,9 @@ if ($RCMAIL->action=='login' && $RCMAIL->task=='mail') { if (empty($_COOKIE)) { $OUTPUT->show_message("cookiesdisabled", 'warning'); }
!empty($_POST['_pass
$RCMAIL->login(trim(get_input_value('_user', RCUBE_INPUT_POST),
' ')
get_input_value('_pass', RCUBE_INPUT_POST, true,
'ISO-8859-1'), $
!empty($_GET['_pass']
$RCMAIL->login(trim(get_input_value('_user', RCUBE_INPUT_GET),
' '),
get_input_value('_pass', RCUBE_INPUT_GET, true,
'ISO-8859-1'), $h // create new session ID unset($_SESSION['temp']); rcube_sess_regenerate_id();
However, you should be extra careful with this, as the user's login will be in plain text in the web page and anyone walking up to the computer can just hover over the link and see the credentials. A better approach might be to have your system start a session for the user in the background, and then just provide a link to the URL for webmail and they will already be logged in.
There may be some other concerns I'm not thinking of here.
Nathan
List info: http://lists.roundcube.net/users/