From 70e005e7ce5cf1dd25ec9ddfde3cfbbd258fadb6 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 12 Dec 2021 12:28:18 +0100 Subject: [PATCH] fix: user not actually deleted --- pkg/models/user_delete.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/models/user_delete.go b/pkg/models/user_delete.go index c590ccaa..1724b0c8 100644 --- a/pkg/models/user_delete.go +++ b/pkg/models/user_delete.go @@ -34,7 +34,7 @@ import ( // RegisterUserDeletionCron registers the cron job that actually removes users who are scheduled to delete. func RegisterUserDeletionCron() { - err := cron.Schedule("0 * * * *", deleteUsers) + err := cron.Schedule("* * * * *", deleteUsers) if err != nil { log.Errorf("Could not register deletion cron: %s", err.Error()) } @@ -195,7 +195,7 @@ func DeleteUser(s *xorm.Session, u *user.User) (err error) { } } - _, err = s.Where("id = ?", u.ID).Delete(u) + _, err = s.Where("id = ?", u.ID).Delete(&user.User{}) if err != nil { return err }