1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-27 13:39:19 -05:00

delete avatar when del user

This commit is contained in:
Unknwon 2015-08-12 03:46:08 +08:00
parent d1a82a82b4
commit cafde1287e

View file

@ -553,10 +553,12 @@ func DeleteUser(u *User) error {
return err
}
// Delete user directory.
// Delete user data.
if err = os.RemoveAll(UserPath(u.Name)); err != nil {
return err
}
// Delete avatar.
os.Remove(u.CustomAvatarPath())
return sess.Commit()
}