summaryrefslogtreecommitdiff
path: root/app/Auth/Ldap.php
diff options
context:
space:
mode:
authorFrancois Ferrand <thetypz@gmail.com>2015-03-19 17:51:22 +0100
committerFrancois Ferrand <thetypz@gmail.com>2015-03-19 17:51:22 +0100
commit67f9465138a316be53e21262c33b4aaef394767a (patch)
treedc987151d2ba9fa212101bd1e14fda91c9478bc2 /app/Auth/Ldap.php
parentcf5182ee4bd70da910a6aa0bb3dd2a3d2e05c82c (diff)
Fix query to check user by name and email.
Diffstat (limited to 'app/Auth/Ldap.php')
-rw-r--r--app/Auth/Ldap.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/Auth/Ldap.php b/app/Auth/Ldap.php
index 376d16f6..ed29199f 100644
--- a/app/Auth/Ldap.php
+++ b/app/Auth/Ldap.php
@@ -261,7 +261,7 @@ class Ldap extends Base
private function getQuery($username, $email)
{
if ($username && $email) {
- return '(&('.sprintf(LDAP_USER_PATTERN, $username).')('.sprintf(LDAP_ACCOUNT_EMAIL, $email).')';
+ return '(&('.sprintf(LDAP_USER_PATTERN, $username).')('.LDAP_ACCOUNT_EMAIL.'='.$email.'))';
}
else if ($username) {
return sprintf(LDAP_USER_PATTERN, $username);