mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-01 05:36:19 +01:00
Add delete all feeds when delete account
This commit is contained in:
parent
fb960db6af
commit
0754dd2f95
3 changed files with 8 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -168,7 +168,7 @@ func Delete(ctx *middleware.Context) {
|
|||
}
|
||||
}
|
||||
|
||||
ctx.Render.HTML(200, "user/delete", ctx.Data)
|
||||
ctx.Render.Redirect("/", 302)
|
||||
}
|
||||
|
||||
const (
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<h4>Account Setting</h4>
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item"><a href="/user/setting">Account Profile</a></li>
|
||||
<li class="list-group-item"><a href="/user/setting/Password">Password</a></li>
|
||||
<li class="list-group-item"><a href="/user/setting/password">Password</a></li>
|
||||
<li class="list-group-item"><a href="/user/setting/notification">Notifications</a></li>
|
||||
<li class="list-group-item list-group-item-success"><a href="/user/setting/ssh/">SSH Keys</a></li>
|
||||
<li class="list-group-item"><a href="/user/setting/security">Security</a></li>
|
||||
|
|
Loading…
Reference in a new issue