Browse Source

delete avatar when del user

pull/1471/head
Unknwon 10 years ago
parent
commit
cafde1287e
  1. 4
      models/user.go

4
models/user.go

@ -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()
}

Loading…
Cancel
Save