findOrFail($user); } $servers = $this->serverRepository->setColumns('id')->findCountWhere([['owner_id', '=', $user->id]]); if ($servers > 0) { throw new DisplayException($this->translator->get('admin/user.exceptions.user_has_servers')); } return $user->delete(); } }