Factoring the model user and correcting password

This commit is contained in:
Chris Mann 2023-07-22 10:13:50 +02:00
parent 7f6b2e211c
commit 8a92020a65

View file

@ -168,6 +168,9 @@ func replaceIfContent(modifReq *ldap.ModifyRequest, key string, value string, pr
if value != "" {
modifReq.Replace(key, []string{value})
} else if previousValue != "" {
log.Printf("modify User delete %v", key)
log.Printf("modify User delete %v", value)
log.Printf("modify User delete %v", previousValue)
modifReq.Delete(key, []string{previousValue})
}
return nil