diff --git a/src/Controller/TorrentController.php b/src/Controller/TorrentController.php index a1ea018..76b09a7 100644 --- a/src/Controller/TorrentController.php +++ b/src/Controller/TorrentController.php @@ -109,10 +109,7 @@ class TorrentController extends AbstractController [ 'session' => [ - 'user' => $user - ], - 'user' => - [ + 'user' => $user, 'id' => $user->getId(), 'moderator' => $user->isModerator() ], diff --git a/src/Controller/UserController.php b/src/Controller/UserController.php index a11291a..574a1e4 100644 --- a/src/Controller/UserController.php +++ b/src/Controller/UserController.php @@ -210,11 +210,13 @@ class UserController extends AbstractController [ 'session' => [ - 'user' => $user + 'user' => $user, + 'owner' => $user->getId() === $userTarget->getId(), + 'moderator' => $user->isModerator() ], 'user' => [ 'id' => $userTarget->getId(), - 'address' => $userTarget->getId() === $user->getId() ? $userTarget->getAddress() : false, + 'address' => $userTarget->getAddress(), 'moderator' => $userTarget->isModerator(), 'approved' => $userTarget->isApproved(), 'status' => $userTarget->isStatus(), diff --git a/templates/default/torrent/info.html.twig b/templates/default/torrent/info.html.twig index bd09bf9..364ac67 100644 --- a/templates/default/torrent/info.html.twig +++ b/templates/default/torrent/info.html.twig @@ -73,7 +73,7 @@