Diff

mod_auth_ldap/mod_auth_ldap.lua @ 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
parent 1287:da2e593317d7
child 1375:90bde50b3915
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 = {};