Uodate person account model: no password and created as time
This commit is contained in:
parent
2e332b8f3e
commit
4318a7b66d
2 changed files with 10 additions and 12 deletions
|
|
@ -933,7 +933,7 @@ func MemberEdit(c *fiber.Ctx) error {
|
||||||
personAccount.Enabled = true
|
personAccount.Enabled = true
|
||||||
personAccount.Groups = strings.Join(authelia.GetPersonGroups(person.ID), "|||")
|
personAccount.Groups = strings.Join(authelia.GetPersonGroups(person.ID), "|||")
|
||||||
|
|
||||||
if personAccount.AccountCreated {
|
if personAccount.AccountCreated.Valid {
|
||||||
personAccount.UpdateNeeded = true
|
personAccount.UpdateNeeded = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -941,7 +941,7 @@ func MemberEdit(c *fiber.Ctx) error {
|
||||||
} else if c.FormValue("account-enabled") != "on" && personAccount.ID > 0 {
|
} else if c.FormValue("account-enabled") != "on" && personAccount.ID > 0 {
|
||||||
personAccount.Enabled = false
|
personAccount.Enabled = false
|
||||||
|
|
||||||
if personAccount.AccountCreated {
|
if personAccount.AccountCreated.Valid {
|
||||||
personAccount.UpdateNeeded = true
|
personAccount.UpdateNeeded = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,7 @@ type PersonAccount struct {
|
||||||
UUID uuid.UUID `gorm:"unique"`
|
UUID uuid.UUID `gorm:"unique"`
|
||||||
Enabled bool
|
Enabled bool
|
||||||
Groups string
|
Groups string
|
||||||
InitialPassword string
|
AccountCreated sql.NullTime
|
||||||
InvitationSent sql.NullTime
|
InvitationSent sql.NullTime
|
||||||
AccountReady bool
|
|
||||||
AccountCreated bool
|
|
||||||
UpdateNeeded bool
|
UpdateNeeded bool
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue