Merge branch 'develop' into feature/filemanager
This commit is contained in:
commit
dbd2900f0f
1 changed files with 5 additions and 0 deletions
|
@ -30,6 +30,7 @@ use Hash;
|
||||||
use Validator;
|
use Validator;
|
||||||
use Mail;
|
use Mail;
|
||||||
use Carbon;
|
use Carbon;
|
||||||
|
use Auth;
|
||||||
|
|
||||||
use Pterodactyl\Models;
|
use Pterodactyl\Models;
|
||||||
use Pterodactyl\Services\UuidService;
|
use Pterodactyl\Services\UuidService;
|
||||||
|
@ -152,6 +153,10 @@ class UserRepository
|
||||||
throw new DisplayException('Cannot delete a user with active servers attached to thier account.');
|
throw new DisplayException('Cannot delete a user with active servers attached to thier account.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(Auth::user()->id === $id) {
|
||||||
|
throw new DisplayException('Cannot delete your own account.');
|
||||||
|
}
|
||||||
|
|
||||||
DB::beginTransaction();
|
DB::beginTransaction();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue