mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
choice of user in form
This commit is contained in:
@@ -106,6 +106,7 @@ class ReportController extends Controller
|
||||
$person = $em->getRepository('ChillPersonBundle:Person')->find($person_id);
|
||||
|
||||
$entity = new Report();
|
||||
$entity->setUser($this->get('security.context')->getToken()->getUser());
|
||||
|
||||
$cFGroup = $em->getRepository('ChillCustomFieldsBundle:CustomFieldsGroup')->find($cf_group_id);
|
||||
$entity->setCFGroup($cFGroup);
|
||||
@@ -139,9 +140,6 @@ class ReportController extends Controller
|
||||
|
||||
$person = $em->getRepository('ChillPersonBundle:Person')->find($person_id);
|
||||
$entity->setPerson($person);
|
||||
|
||||
$user = $this->get('security.context')->getToken()->getUser();
|
||||
$entity->setUser($user);
|
||||
|
||||
$em->persist($entity);
|
||||
$em->flush();
|
||||
|
Reference in New Issue
Block a user