Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

More LDAP debugging and don't sync LDAP customers if LDAP customer gr…

…oup is not set

git-svn-id: http://sitracker.svn.sourceforge.net/svnroot/sitracker/branches/3.x@5900 6e0da8f0-d90d-0410-b14f-823b0ad1652c
  • Loading branch information...
commit 92e6be08fc90337bd49a870988c502887dc71bac 1 parent 2fdb623
ivanlucas authored paulheaney committed
Showing with 9 additions and 4 deletions.
  1. +9 −4 lib/functions.inc.php
13 lib/functions.inc.php
View
@@ -199,7 +199,7 @@ function authenticate($username, $password)
elseif (mysql_num_rows($result) > 1)
{
// Multiple this should NEVER happen
- trigger_error($GLOBALS['strUsernameNotUnique'], E_USER_ERROR);
+ trigger_error("Username not unique", E_USER_ERROR);
$toReturn = false;
}
else
@@ -215,9 +215,14 @@ function authenticate($username, $password)
if ($toReturn)
{
journal(CFG_LOGGING_MAX,'User Authenticated',"{$username} authenticated from " . getenv('REMOTE_ADDR'),CFG_JOURNAL_LOGIN,0);
+ debug_log ("Authenticate: User authenticated",TRUE);
+ }
+ else
+ {
+ debug_log ("authenticate: User NOT authenticated",TRUE);
}
- debug_log ("authenticate returning {$toReturn}");
+
return $toReturn;
}
@@ -287,9 +292,9 @@ function authenticateContact($username, $password)
}
else
{
- debug_log ("Authenticate: No matching contact found in db");
+ debug_log ("Authenticate: No matching contact '$username' found in db");
// Don't exist, check LDAP etc
- if ($CONFIG['use_ldap'])
+ if ($CONFIG['use_ldap'] AND !empty($CONFIG['ldap_customer_group']))
{
$toReturn = authenticateLDAP($username, $password, 0, false);
if ($toReturn === -1) $toReturn = false;
Please sign in to comment.
Something went wrong with that request. Please try again.