Add Getuser calls to delete user

This commit is contained in:
Lucas Nicodemus 2015-02-21 22:51:38 -07:00
parent 91d5fab27d
commit 817479ea70

View file

@ -88,12 +88,13 @@ namespace TShockAPI.DB
{ {
try try
{ {
tempuser = GetUser(user);
int affected = database.Query("DELETE FROM Users WHERE Username=@0", user.Name); int affected = database.Query("DELETE FROM Users WHERE Username=@0", user.Name);
if (affected < 1) if (affected < 1)
throw new UserNotExistException(user.Name); throw new UserNotExistException(user.Name);
Hooks.AccountHooks.OnAccountDelete(user); Hooks.AccountHooks.OnAccountDelete(tempuser);
} }
catch (Exception ex) catch (Exception ex)
{ {