Roundcube Community Forum

 

Single Login [KEEP UPDATED IN NEW VERSIONS]

Started by MatBoy, June 13, 2011, 11:12:23 AM

Previous topic - Next topic

MatBoy

Hi Guys,


The following script is ideal to use as Single Login because it does not post anything.

Because of differences in newer versions it's nice to place the fixes here so we can continue using this plugin instead of this website that (we never know) can go down:

Roundcube login via PHP script - Yet another web log

I hope everyone is willing to help this plugin live further :)

Cheers,

MatBoy

MatBoy

I have not been able to fix this issue yet.

I have had contact with Phillipp and he told me we should be able to see what the normal login form does and change the login script to that same type of work.

Any idea ?

AngelDeLaNoche

I have created a custom form and am trying to use this to process the login.
 
$rcl->login($_POST["_user"];, $_POST["_pass");
 
I have Roundcube-0.5.3,1 and am getting "ERROR: Technical problem, Unable to determine the login status. Unable to continue due to technical problems."

SKaero

You need to remove the semicolon $rcl->login($_POST["_user"], $_POST["_pass");

AngelDeLaNoche

My entire code is below, I am still getting "Username = ******. Password = ******. ERROR: Technical problem, Unable to determine the login status. Unable to continue due to technical problems."  I tried an unmodified version of rclogin.php (changing only the username password), and get the same error.



$Username = $_POST["_user"];
$Password = $_POST["_pass"];
 
include "RoundcubeLogin.class.php";   
 
$rcl = new RoundcubeLogin("/roundcube/", $debug);
 
try {
   if ($rcl->isLoggedIn())
      $rcl->redirect();
 
   $rcl->login($Username, $Password);
 
  if ($rcl->isLoggedIn())
      $rcl->redirect();
 
   die("ERROR: Login failed due to a wrong user/pass combination.");
}
catch (RoundcubeLoginException $ex) {
   echo "Username = " . $Username . ". Password = " . $Password . ". " . "ERROR: Technical problem, ".$ex->getMessage();
   $rcl->dumpDebugStack(); exit;
}
?>

Hermiod

Just installed Round Cube.

Downloaded RoundcubeLogin.class.php and the test file.

Put both files in the roundcube directory.

Tried to run the test file, if fails:

Status: ERROR: Unable to determine the login status. Unable to continue due to technical problems.
Status - Login - Logout
REQUEST:

GET  HTTP/1.1
Host: site.org
Cookie: PHPSESSID=397d622054e126db8cd914bdc36376a6; roundcube_sessid=d1fbc6a4ef7bad2bf64bd3b49fcd014a; GFTcookieCheck=4:48 - 02/07/12
Connection: close

RESPONSE:
<!DOCTYPE HTML PUBLIC &quot;-//IETF//DTD HTML 2.0//EN&quot;>
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
</p>
</body></html>
UNKNOWN LOGIN STATE:
Unable to determine the login status. Did you change the RC version?


I did edit the test file to put in a valid username, password. I also changed the rcpath in the test.php to "".

Any ideas?