Beispiel #1
0
 public function executeUpdateForget()
 {
     $code = $this->getRequestParameter('code');
     $c = new Criteria();
     $c->add(TestApplicantPeer::CODE, $code);
     $test_applicant = TestApplicantPeer::doSelectOne($c);
     if ($test_applicant != null) {
         $test_applicant_detail = TestApplicantDetailPeer::retrieveByPk($test_applicant->getTestApplicantDetailId());
         $crypted = sha1(sfConfig::get('app_salt') . $test_applicant_detail->getDob('dmY'));
         $test_applicant->setPassword($crypted);
         $test_applicant->save();
         return $this->redirect('applicant/access?code=' . $test_applicant->getCode() . '&dob=' . $test_applicant_detail->getDob('dmY'));
     } else {
         return $this->redirect('applicant/noaccess');
     }
 }