~ucl-cs-study-devs/study.cs.ucl-websites/password-cn

« back to all changes in this revision

Viewing changes to src/UCL/StudyBundle/Controller/DefaultController.php

  • Committer: Steve DODIER-LAZARO
  • Date: 2015-06-21 22:11:45 UTC
  • mfrom: (152.1.4 multitasking)
  • Revision ID: sdodierl@secdev.cs.ucl.ac.uk-20150621221145-ul7wx3ecnuo2g1ys
MergingĀ fromĀ upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
    public function joinScreeningAction(Request $request)
41
41
    {
42
42
      $translator = $this->get('translator');
 
43
      $em = $this->getDoctrine()->getManager();
43
44
      $params = $this->setupParameters($request, false);
44
45
      $params['page'] = array('title' => $translator->trans('Register for Participant Screening'));
45
46
      
46
47
      $previous = $request->request->get('registration');
47
 
      $task = new RegistrationJob($previous !== null ? $previous : array());
 
48
      $task = new RegistrationJob($em, $previous !== null ? $previous : array());
48
49
 
49
50
      $prev_email = $previous ? (array_key_exists('email', $previous) ? $previous['email']['first'] : '') : '';
50
51
      $prev_browser = $previous ? (array_key_exists('browser', $previous) ? $previous['browser'] : array()) : array();
119
120
              $encodedPw = $encoder->encodePassword($participant, $password);
120
121
              $participant->setPassword($encodedPw);
121
122
 
122
 
              $em = $this->getDoctrine()->getManager();
123
123
              $em->persist($participant);
124
124
              $em->flush();
125
125