Uodate person account model: no password and created as time

This commit is contained in:
William Bouzourène 2026-04-17 16:28:57 +02:00
parent 2e332b8f3e
commit 4318a7b66d
Signed by: bouzoure
GPG key ID: 423440D735B56BE2
2 changed files with 10 additions and 12 deletions

View file

@ -933,7 +933,7 @@ func MemberEdit(c *fiber.Ctx) error {
personAccount.Enabled = true
personAccount.Groups = strings.Join(authelia.GetPersonGroups(person.ID), "|||")
if personAccount.AccountCreated {
if personAccount.AccountCreated.Valid {
personAccount.UpdateNeeded = true
}
@ -941,7 +941,7 @@ func MemberEdit(c *fiber.Ctx) error {
} else if c.FormValue("account-enabled") != "on" && personAccount.ID > 0 {
personAccount.Enabled = false
if personAccount.AccountCreated {
if personAccount.AccountCreated.Valid {
personAccount.UpdateNeeded = true
}

View file

@ -31,9 +31,7 @@ type PersonAccount struct {
UUID uuid.UUID `gorm:"unique"`
Enabled bool
Groups string
InitialPassword string
AccountCreated sql.NullTime
InvitationSent sql.NullTime
AccountReady bool
AccountCreated bool
UpdateNeeded bool
}