Factoring the model user and correcting password

This commit is contained in:
Chris Mann 2023-07-22 08:47:02 +02:00
parent 2ce3881bdf
commit fd85d1d1ef

View file

@ -31,13 +31,13 @@ type User struct {
func get(user User, config *ConfigFile, ldapConn *ldap.Conn) (*User, error) {
searchReq := ldap.NewSearchRequest(
user.DN,
ldap.ScopeBaseObject,
config.UserBaseDN,
ldap.ScopeSingleLevel,
ldap.NeverDerefAliases,
0,
0,
false,
"(objectClass=inetOrgPerson)",
"(cn="+user.CN+")",
[]string{
"cn",
"givenName",