|
|
@@ -481,6 +481,7 @@ class User {
|
|
|
if($DBG){echo'<pre style="max-height:200px;overflow:auto;border:1px solid red;text-align:left;">LDAP user (' . __CLASS__ . '::' . __FUNCTION__ . ':' . __LINE__ . '): ';print_r($ldapUser);echo'</pre>';}
|
|
|
if($DBG){echo'<pre style="max-height:200px;overflow:auto;border:1px solid red;text-align:left;">ldap_bind (' . __CLASS__ . '::' . __FUNCTION__ . ':' . __LINE__ . '): ';print_r(array('ldaprdn'=>$ldapUser['user_dn'], 'pass'=>'***'));echo'</pre>';}
|
|
|
$ldapbind = $ldap->bind($ldapUser['user_dn'], $pass, $errorMsg);
|
|
|
+ if (!$ldapbind && "Error Binding to LDAP: No additional information is available." === $errorMsg) throw new Exception("Nieprawidłowy login lub hasło");
|
|
|
if (!$ldapbind) throw new Exception("Wystąpiły błędy podczas próby logowania. {$errorMsg}");
|
|
|
|
|
|
$user = new stdClass();
|