I somehow can't get this to work. I had it working, messed up my php server & had no backups from the working version... I guess I had a similar solution.
public function schreibenAction() {
$user = $this->getDoctrine()
->getRepository('AppBundle:User')
->find(1); //How can I search for the currently logged user?
if (!$user) {
throw $this->createNotFoundException(
'No user found for id 1'
);
}
$path = $user->getPath();
return $this->render('default/unterlagen/schreiben.html.twig', array(
'path' => $path,
));
}
I need the path value from the database..
SELECT t0.id AS id_1, t0.username AS username_2, t0.password AS password_3, t0.path AS path_4, t0.is_active AS is_active_5 FROM app_users t0 WHERE t0.id = ?