changeset 1610:062ed39a1805

mod_auth_ldap: Fix nil traceback when using uninitialized LDAP connection.
author Waqas Hussain <waqas20@gmail.com>
date Fri, 13 Feb 2015 10:44:23 -0500 (2015-02-13)
parents 5f139770061e
children 770236ea9678
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	Thu Feb 12 18:57:06 2015 -0500
+++ b/mod_auth_ldap/mod_auth_ldap.lua	Fri Feb 13 10:44:23 2015 -0500
@@ -51,7 +51,7 @@
 
 local function get_user(username)
 	module:log("debug", "get_user(%q)", username);
-	for dn, attr in ld:search({
+	for dn, attr in ldap_search({
 		base = ldap_base;
 		scope = ldap_scope;
 		sizelimit = 1;
@@ -59,7 +59,7 @@
 			user = ldap_filter_escape(username);
 			host = host;
 		});
-	}) do return dn, attr; end
+	}, 3) do return dn, attr; end
 end
 
 local provider = {};