I'm using fos userbundle to create pages for the route /profile
. Now I want to be able to see other users profiles too so I created my own controller generating /profile/{username}
.
The problem I'm having now is that I can't use the fos userbundle path /profile/edit
. It does show the path in route:debug
Is there any way to make an exception for the route /profile/edit?
here's my controller:
/**
* @Route("/profile/{username}")
* @Template()
* @Security("has_role('ROLE_USER')")
*/
public function showOtherAction($username){
$em = $this->get('doctrine')->getManager();
$user = $em->getRepository('DigitalArtLabBundle:User')->findOneByUsername($username);
$sessions = $em->getRepository('DigitalArtLabBundle:checkin')->findLastSessions($user->getUsername() );
return $this->render('FOSUserBundle:Profile:show.html.twig', array(
'user' => $user,
'ses' => $sessions
));
}
thank's ahead :)