liquid_feedback_frontend
annotate env/ldap/bind_as_app.lua @ 1176:5ae3b8d819c5
Added missing WebMCP 2.0 support for member image upload
author | bsw |
---|---|
date | Thu Mar 26 19:32:44 2015 +0100 (2015-03-26) |
parents | 58f48a8a202a |
children |
rev | line source |
---|---|
bsw@1071 | 1 -- binds to configured LDAP server with application's credentials |
bsw@1071 | 2 -- -------------------------------------------------------------------------- |
bsw@1071 | 3 -- |
bsw@1071 | 4 -- returns |
bsw@1071 | 5 -- ldap_conn: in case of success, an LDAP connection handle |
bsw@1071 | 6 -- err: in case of an error, an error code (string) |
bsw@1071 | 7 |
bsw@1071 | 8 function ldap.bind_as_app() |
bsw@1071 | 9 |
bsw@1071 | 10 local dn, password |
bsw@1071 | 11 |
bsw@1071 | 12 if config.ldap.bind_as then |
bsw@1071 | 13 dn = config.ldap.bind_as.dn |
bsw@1071 | 14 password = config.ldap.bind_as.password |
bsw@1071 | 15 end |
bsw@1071 | 16 |
bsw@1071 | 17 local ldap_conn, err = ldap.bind(dn, password) |
bsw@1071 | 18 |
bsw@1071 | 19 return ldap_conn, err |
bsw@1071 | 20 |
bsw@1071 | 21 end |