Add Getuser calls to delete user
This commit is contained in:
parent
91d5fab27d
commit
817479ea70
1 changed files with 2 additions and 1 deletions
|
|
@ -88,12 +88,13 @@ namespace TShockAPI.DB
|
|||
{
|
||||
try
|
||||
{
|
||||
tempuser = GetUser(user);
|
||||
int affected = database.Query("DELETE FROM Users WHERE Username=@0", user.Name);
|
||||
|
||||
if (affected < 1)
|
||||
throw new UserNotExistException(user.Name);
|
||||
|
||||
Hooks.AccountHooks.OnAccountDelete(user);
|
||||
Hooks.AccountHooks.OnAccountDelete(tempuser);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue