[Vtigercrm-commits] [vtiger-commits] r9860 - /customerportal/trunk/CustomerAuthenticate.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Mon Nov 20 01:54:12 EST 2006


Author: richie
Date: Sun Nov 19 23:54:06 2006
New Revision: 9860

Log:
* Added debug informations to find the error if any when login

Modified:
    customerportal/trunk/CustomerAuthenticate.php

Modified: customerportal/trunk/CustomerAuthenticate.php
==============================================================================
--- customerportal/trunk/CustomerAuthenticate.php (original)
+++ customerportal/trunk/CustomerAuthenticate.php Sun Nov 19 23:54:06 2006
@@ -1,4 +1,4 @@
-<?
+<?php
 /*********************************************************************************
 ** The contents of this file are subject to the vtiger CRM Public License Version 1.0
  * ("License"); You may not use this file except in compliance with the License
@@ -11,12 +11,6 @@
 
 include("include.php");
 
-$err = $client->getError();
-if ($err)
-{
-        echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
-}
-
 $username = $_REQUEST['username'];
 $password = $_REQUEST['pw'];
 
@@ -27,6 +21,19 @@
 
 global $result;
 $result = $client->call('authenticate_user', $params, $Server_Path, $Server_Path);
+
+//The following are the debug informations
+$err = $client->getError();
+if ($err)
+{
+	echo '<h2>request</h2><pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';
+	echo '<h2>response</h2><pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';
+	echo '<h2>debug</h2><pre>' . htmlspecialchars($client->debug_str, ENT_QUOTES) . '</pre>';
+	
+	echo '<h2>Constructor error</h2><pre>' . $err . '</pre>';
+	exit;
+}
+
 
 if($result[1] == $username && $result[2] == $password)
 {





More information about the vtigercrm-commits mailing list