Factoring the model user and correcting password

This commit is contained in:
Chris Mann 2023-07-22 10:07:58 +02:00
parent 57bf01d908
commit b91d2d4f9c

View file

@ -171,7 +171,7 @@ func replaceIfContent(modifReq *ldap.ModifyRequest, key string, value string, pr
log.Printf("replaceIfContent : %v", previousValue)
if value != "" {
modifReq.Replace(key, []string{value})
} else {
} else if previousValue != "" {
modifReq.Delete(key, []string{previousValue})
}
return nil