Commit 0bd1b3c8 authored by Mat's avatar Mat

récupère les utilisateurs du repo

parent fd6f82cd
......@@ -148,8 +148,16 @@ class ChatHub implements MessageComponentInterface
// twig va génèrer le fragment à retourner
$twig = $this->container->get('templating');
$users = array();
foreach (array_keys($this->clients) as $name)
{
$user = $repo->findOneBy(array('username' => $name));
$users[] = $user;
}
$fragment = $twig->render('@Socket/Chat/listUsers.html.twig', array(
'usernames' => array_keys($this->clients)
'usernames' => $users
));
// formate la response
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment