Explorar o código

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

AVMG20 %!s(int64=4) %!d(string=hai) anos
pai
achega
fc2d972183
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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}");
         });
     }