Browse Source

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

AVMG20 4 năm trước cách đây
mục cha
commit
fc2d972183
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  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}");
         });
     }