[evolvis-commits] r10694: improved error outpu?==?UTF-8?Q?t↵

mirabilos at evolvis.org mirabilos at evolvis.org
Thu Feb 24 17:53:54 CET 2011


Author: mirabilos
Date: 2011-02-24 17:53:54 +0100 (Thu, 24 Feb 2011)
New Revision: 10694

Modified:
   trunk/gforge_base/evolvisforge-5.1/gforge-plugin-ldapextauth/include/LdapExtAuthPlugin.class
Log:
improved error output


Modified: trunk/gforge_base/evolvisforge-5.1/gforge-plugin-ldapextauth/include/LdapExtAuthPlugin.class
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/gforge-plugin-ldapextauth/include/LdapExtAuthPlugin.class	2011-02-24 16:53:53 UTC (rev 10693)
+++ trunk/gforge_base/evolvisforge-5.1/gforge-plugin-ldapextauth/include/LdapExtAuthPlugin.class	2011-02-24 16:53:54 UTC (rev 10694)
@@ -74,7 +74,6 @@
 		global $feedback,$Language;
 	
 		if (!$this->ldap_conn) {
-			//echo "ldap_connect ($this->ldap_server, $this->ldap_port);";
 			$this->ldap_conn = ldap_connect ($this->ldap_server,
 							 $this->ldap_port);
 		}
@@ -110,7 +109,7 @@
 			}
 		} else {
 			// User doesn't exist in DB yet
-			if (ldap_bind($this->ldap_conn, $dn, $passwd)) {
+			if (@ldap_bind($this->ldap_conn, $dn, $passwd)) {
 				// User authenticated
 				// Now get her info
 				if ($this->ldap_kind=="AD"){
@@ -192,13 +191,13 @@
 					    $mail_site,$mail_va,$language_id,$timezone,$jabber_address,$jabber_only,$theme_id,
 					    $unix_box, $address, $address2, $phone, $fax, $title, $ccode, $send_mail)) {
 					$GLOBALS['ldap_auth_failed']=true;
-					echo "<br>Error Creating User: ".$u->getErrorMessage();
+					$feedback = "<br>Error Creating User: ".$u->getErrorMessage();
 					return false;
 				}
 
 				if (!$u->setStatus ('A')) {
 					$GLOBALS['ldap_auth_failed']=true;
-					echo "<br>Error Activating User: ".$u->getErrorMessage();
+					$feedback = "<br>Error Activating User: ".$u->getErrorMessage();
 					return false;
 				}
 				$GLOBALS['ldap_auth_failed']=false;



More information about the evolvis-commits mailing list