Factoring the model user and correcting password
This commit is contained in:
parent
2ce3881bdf
commit
fd85d1d1ef
1 changed files with 3 additions and 3 deletions
|
@ -31,13 +31,13 @@ type User struct {
|
||||||
|
|
||||||
func get(user User, config *ConfigFile, ldapConn *ldap.Conn) (*User, error) {
|
func get(user User, config *ConfigFile, ldapConn *ldap.Conn) (*User, error) {
|
||||||
searchReq := ldap.NewSearchRequest(
|
searchReq := ldap.NewSearchRequest(
|
||||||
user.DN,
|
config.UserBaseDN,
|
||||||
ldap.ScopeBaseObject,
|
ldap.ScopeSingleLevel,
|
||||||
ldap.NeverDerefAliases,
|
ldap.NeverDerefAliases,
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
false,
|
false,
|
||||||
"(objectClass=inetOrgPerson)",
|
"(cn="+user.CN+")",
|
||||||
[]string{
|
[]string{
|
||||||
"cn",
|
"cn",
|
||||||
"givenName",
|
"givenName",
|
||||||
|
|
Loading…
Reference in a new issue