Skip to content

Commit dbd2900

Browse files
committed
Merge branch 'develop' into feature/filemanager
2 parents 4bcab05 + b67813b commit dbd2900

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/Repositories/UserRepository.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
use Validator;
3131
use Mail;
3232
use Carbon;
33+
use Auth;
3334

3435
use Pterodactyl\Models;
3536
use Pterodactyl\Services\UuidService;
@@ -152,6 +153,10 @@ public function delete($id)
152153
throw new DisplayException('Cannot delete a user with active servers attached to thier account.');
153154
}
154155

156+
if(Auth::user()->id === $id) {
157+
throw new DisplayException('Cannot delete your own account.');
158+
}
159+
155160
DB::beginTransaction();
156161

157162
try {

0 commit comments

Comments
 (0)