Ability to create account for members

This commit is contained in:
William Bouzourène 2026-03-18 19:17:25 +01:00
parent 07db65f63f
commit 2e332b8f3e
Signed by: bouzoure
GPG key ID: 423440D735B56BE2
5 changed files with 138 additions and 16 deletions

View file

@ -762,7 +762,7 @@ func ContactEdit(c *fiber.Ctx) error {
if len(data.Email) > 0 {
var personEmail []models.Person
result := db.Find(&personEmail, "LOWER(email) = LOWER(?)", data.Email)
result := db.Find(&personEmail, "LOWER(email) = LOWER(?) AND id <> ?", data.Email, person.ID)
if result.Error != nil {
return result.Error
}