accounts: invalidate user cache in more/all places

using app.userSummary as a source of relevant storage places and things
to look for.
This commit is contained in:
Harvey Tindall
2025-09-01 21:28:56 +01:00
parent 6ebc7d18bf
commit d88194b9bd
6 changed files with 19 additions and 0 deletions
+2
View File
@@ -131,6 +131,7 @@ func (app *appContext) checkUsers(remindBeforeExpiry *DayTimerSet) {
activity.Type = ActivityDeletion
// Store the user name, since there's no longer a user ID to reference back to
activity.Value = user.Name
app.InvalidateUserCaches()
} else {
app.info.Printf(lm.DisableExpiredUser, user.Name)
// Admins can't be disabled
@@ -138,6 +139,7 @@ func (app *appContext) checkUsers(remindBeforeExpiry *DayTimerSet) {
user.Policy.IsAdministrator = false
err, _, _ = app.SetUserDisabled(user, true)
activity.Type = ActivityDisabled
app.InvalidateUserCaches()
}
if err != nil {
app.err.Printf(lm.FailedDeleteOrDisableExpiredUser, user.ID, err)