Example #1
0
 public function fullLoad()
 {
     if ($this->getUserId()) {
         $user = new User();
         $user->load($this->getUserId());
         $this->setUserName($user->getName() . ' ' . $user->getSecondName());
     }
     if ($this->getPatientId()) {
         $patient = new Patient();
         $patient->load($this->getPatientId());
         $this->setPatientName($patient->getName() . ' ' . $patient->getSecondName());
     }
     if ($this->getDiseaseId()) {
         $disease = new Disease();
         $disease->load($this->getDiseaseId());
         $this->setTitle($disease->getTitle());
     }
 }
Example #2
0
 public function fullLoad()
 {
     if ($this->getUserId()) {
         $user = new User();
         $user->load($this->getUserId());
         $this->setUserName($user->getName() . ' ' . $user->getSecondName());
     }
     if ($this->getPatientId()) {
         $patient = new Patient();
         $patient->load($this->getPatientId());
         $this->setPatientName($patient->getName() . ' ' . $patient->getSecondName());
     }
     if ($this->getServiceId()) {
         $service = new Service();
         $service->load($this->getServiceId());
         $this->setTitle($service->getTitle());
         $this->setPrice($service->getPrice());
     }
 }
 /**
  * Send 'remind password' email.
  *
  * @param Request $request
  * @return \Symfony\Component\HttpFoundation\RedirectResponse
  */
 public function remindAction(Request $request)
 {
     if (!$request->getSession()->has('userId')) {
         $data = $request->request->all();
         $user = new User();
         $user->load($data['email'], 'email');
         if ($user->getId()) {
             $message = \Swift_Message::newInstance()->setSubject('Forget Password')->setFrom('*****@*****.**')->setTo($user->getEmail())->setBody($this->renderView('LancerLanceBundle:Emails:forgetpassword.html.twig', array('name' => $user->getName(), 'hash' => $user->getSecretHash())), 'text/html');
             $this->get('mailer')->send($message);
             $request->getSession()->set('message', 'Email with instruction has been send.');
         }
     }
     return $this->redirectToRoute('lance_authorization');
 }