Browse Source

Fixed a bug where deleting a user wouldn't delete the linked discord acc

AVMG20 4 years ago
parent
commit
fc2d972183
1 changed files with 2 additions and 0 deletions
  1. 2 0
      app/Models/User.php

+ 2 - 0
app/Models/User.php

@@ -107,6 +107,8 @@ class User extends Authenticatable implements MustVerifyEmail
 
             $user->vouchers()->detach();
 
+            $user->discordUser()->delete();
+
             Pterodactyl::client()->delete("/application/users/{$user->pterodactyl_id}");
         });
     }