Mercurial > prosody-modules
comparison mod_auth_ldap/mod_auth_ldap.lua @ 2851:4b10636bd743
"Export" get_user from mod_auth_ldap
| author | Jonas Wielicki <jonas@wielicki.name> |
|---|---|
| date | Tue, 05 Dec 2017 20:37:07 +0100 |
| parents | 8407137c0a3b |
| children | a81456a13797 |
comparison
equal
deleted
inserted
replaced
| 2850:3ba8fd1a297e | 2851:4b10636bd743 |
|---|---|
| 53 module:log("error", "LDAP: %s", tostring(attr)); | 53 module:log("error", "LDAP: %s", tostring(attr)); |
| 54 end | 54 end |
| 55 return dn, attr; | 55 return dn, attr; |
| 56 end | 56 end |
| 57 | 57 |
| 58 local function get_user(username) | 58 function get_user(username) |
| 59 module:log("debug", "get_user(%q)", username); | 59 module:log("debug", "get_user(%q)", username); |
| 60 return ldap_do("search", 2, { | 60 return ldap_do("search", 2, { |
| 61 base = ldap_base; | 61 base = ldap_base; |
| 62 scope = ldap_scope; | 62 scope = ldap_scope; |
| 63 sizelimit = 1; | 63 sizelimit = 1; |
