Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Commit

Permalink
Seul l'utilisateur peut voir ses parties
Browse files Browse the repository at this point in the history
  • Loading branch information
GauthierBosson committed Mar 26, 2018
1 parent 733928c commit 12b9d2c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Controller/RollAndPlay/IndexController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
use App\Controller\Helper;
use App\Entity\FichePersonnages;
use App\Entity\Parties;
use App\Entity\Users;
use App\Form\ChatType;
use App\Entity\Actualites;
use App\Entity\Chat;
use App\Entity\Users;
use App\Form\FichePersoType;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
Expand Down Expand Up @@ -46,7 +46,8 @@ public function index() {
public function lobby() {
$repository = $this->getDoctrine()
->getRepository(Parties::class);
$parties = $repository->findAll();
$user = $this->getUser();
$parties = $repository->findBy(array('user' => $user->getId()));
$partie = new Parties();
return $this->render('Partie/lobby_partie.html.twig', [
'nom' => $this->slugify($partie->getNom()),
Expand Down

0 comments on commit 12b9d2c

Please sign in to comment.