diff options
author | Unknown <joe2010xtmf@163.com> | 2014-03-16 06:38:39 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-03-16 06:38:39 -0400 |
commit | 0754dd2f955c70994753cd18228333ca32ceee72 (patch) | |
tree | a19b74c2d4b769046743536b646dc6a90428be27 /models/user.go | |
parent | fb960db6afa5fa84e60556f0c7d240b4af165a8d (diff) | |
download | gitea-0754dd2f955c70994753cd18228333ca32ceee72.tar.gz gitea-0754dd2f955c70994753cd18228333ca32ceee72.zip |
Add delete all feeds when delete account
Diffstat (limited to 'models/user.go')
-rw-r--r-- | models/user.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/models/user.go b/models/user.go index ffeb72525d..463d4a271f 100644 --- a/models/user.go +++ b/models/user.go @@ -152,7 +152,12 @@ func DeleteUser(user *User) error { // TODO: check issues, other repos' commits - // Delete SSH keys. + // Delete all feeds. + if _, err = orm.Delete(&Action{UserId: user.Id}); err != nil { + return err + } + + // Delete all SSH keys. keys := make([]PublicKey, 0, 10) if err = orm.Find(&keys, &PublicKey{OwnerId: user.Id}); err != nil { return err |