Changeset

1374:ab638f6b53dc

mod_auth_ldap: Fix issue with some versions of LuaLDAP
author Kim Alvefur <zash@zash.se>
date Tue, 25 Mar 2014 15:11:34 +0100
parents 1373:985bfc6e8cad
children 1375:90bde50b3915
files mod_auth_ldap/mod_auth_ldap.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mod_auth_ldap/mod_auth_ldap.lua	Sat Mar 29 22:56:24 2014 +0700
+++ b/mod_auth_ldap/mod_auth_ldap.lua	Tue Mar 25 15:11:34 2014 +0100
@@ -21,14 +21,14 @@
 
 local function get_user(username)
 	module:log("debug", "get_user(%q)", username);
-	return ld:search({
+	for dn, attr in ld:search({
 		base = ldap_base;
 		scope = ldap_scope;
 		filter = ldap_filter:gsub("%$(%a+)", {
 			user = ldap_filter_escape(username);
 			host = host;
 		});
-	})();
+	}) do return dn, attr; end
 end
 
 local provider = {};