parent
							
								
									49dd719117
								
							
						
					
					
						commit
						28f7a809a5
					
				| @ -127,7 +127,7 @@ class UserController extends Controller | ||||
|     public function delete(Request $request, User $user) | ||||
|     { | ||||
|         if ($request->user()->id === $user->id) { | ||||
|             throw new DisplayException($this->translator->trans('admin/user.exceptions.user_has_servers')); | ||||
|             throw new DisplayException($this->translator->get('admin/user.exceptions.user_has_servers')); | ||||
|         } | ||||
| 
 | ||||
|         $this->deletionService->handle($user); | ||||
|  | ||||
| @ -1,4 +1,5 @@ | ||||
| <?php | ||||
| 
 | ||||
| /** | ||||
|  * Pterodactyl - Panel | ||||
|  * Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>. | ||||
| @ -62,7 +63,7 @@ class NodeDeletionService | ||||
| 
 | ||||
|         $servers = $this->serverRepository->setColumns('id')->findCountWhere([['node_id', '=', $node]]); | ||||
|         if ($servers > 0) { | ||||
|             throw new HasActiveServersException($this->translator->trans('exceptions.node.servers_attached')); | ||||
|             throw new HasActiveServersException($this->translator->get('exceptions.node.servers_attached')); | ||||
|         } | ||||
| 
 | ||||
|         return $this->repository->delete($node); | ||||
|  | ||||
| @ -1,4 +1,5 @@ | ||||
| <?php | ||||
| 
 | ||||
| /** | ||||
|  * Pterodactyl - Panel | ||||
|  * Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>. | ||||
| @ -62,7 +63,7 @@ class UserDeletionService | ||||
| 
 | ||||
|         $servers = $this->serverRepository->setColumns('id')->findCountWhere([['owner_id', '=', $user]]); | ||||
|         if ($servers > 0) { | ||||
|             throw new DisplayException($this->translator->trans('admin/user.exceptions.user_has_servers')); | ||||
|             throw new DisplayException($this->translator->get('admin/user.exceptions.user_has_servers')); | ||||
|         } | ||||
| 
 | ||||
|         return $this->repository->delete($user); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Alex
						Alex