/**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     $model = new ConfirmationRecord();
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (isset($_POST['ConfirmationRecord'])) {
         $model->attributes = $_POST['ConfirmationRecord'];
         if ($model->save()) {
             if (isset($model->member_id) and $model->member_id) {
                 if (!isset($model->member->confirmation_dt)) {
                     $member = $model->member;
                     $member->confirmation_dt = $model->confirmation_dt;
                     if (!$member->save(true, array('confirmation_dt'))) {
                         Yii::trace(sprintf("Error saving member %s confirmation_dt: %s", $member->id, implode(", ", $member->getErrors('confirmation_dt'))), 'application.controllers.ConfirmationRecord');
                     }
                 }
             }
             $this->redirect(array('view', 'id' => $model->id));
         }
     }
     $this->render('create', array('model' => $model));
 }