Factoring the model user and correcting password

This commit is contained in:
Chris Mann 2023-07-22 08:43:53 +02:00
parent 149078bc16
commit 2ce3881bdf

View file

@ -33,16 +33,21 @@ func get(user User, config *ConfigFile, ldapConn *ldap.Conn) (*User, error) {
searchReq := ldap.NewSearchRequest(
user.DN,
ldap.ScopeBaseObject,
0,
ldap.NeverDerefAliases,
0,
0,
false,
"",
[]string{
"(objectClass=inetOrgPerson)",
[]string{
"cn",
"givenName",
"displayName",
"uid",
"sn",
"mail",
"description",
},
nil,
)
nil)
searchRes, err := ldapConn.Search(searchReq)
if err != nil {
log.Printf("get User : %v", err)