We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6d479da commit b67813bCopy full SHA for b67813b
app/Repositories/UserRepository.php
@@ -30,6 +30,7 @@
30
use Validator;
31
use Mail;
32
use Carbon;
33
+use Auth;
34
35
use Pterodactyl\Models;
36
use Pterodactyl\Services\UuidService;
@@ -152,6 +153,10 @@ public function delete($id)
152
153
throw new DisplayException('Cannot delete a user with active servers attached to thier account.');
154
}
155
156
+ if(Auth::user()->id === $id) {
157
+ throw new DisplayException('Cannot delete your own account.');
158
+ }
159
+
160
DB::beginTransaction();
161
162
try {
0 commit comments