fix: user not actually deleted
This commit is contained in:
parent
f581885e65
commit
70e005e7ce
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue