Factoring the model user and correcting password

This commit is contained in:
Chris Mann 2023-07-22 09:16:23 +02:00
parent d0d76e61f8
commit 100d143d9a

View file

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