mirror of
https://github.com/go-gitea/gitea
synced 2024-12-23 17:14:27 +00:00
delete avatar when del user
This commit is contained in:
parent
d1a82a82b4
commit
cafde1287e
@ -553,10 +553,12 @@ func DeleteUser(u *User) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete user directory.
|
// Delete user data.
|
||||||
if err = os.RemoveAll(UserPath(u.Name)); err != nil {
|
if err = os.RemoveAll(UserPath(u.Name)); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
// Delete avatar.
|
||||||
|
os.Remove(u.CustomAvatarPath())
|
||||||
|
|
||||||
return sess.Commit()
|
return sess.Commit()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user