我不知道怎么办不起。我有它的工作,搞砸了我的PHP服务器&没有来自工作版本的备份...我想我有类似的解决方案。
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,
));
}
我需要数据库中的路径值..
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 = ?