public function processAction() { if (!$this->request->isPost()) { return $this->redirect()->toRoute(NULL, array('controller' => 'Create', 'action' => 'index')); } $post = $this->request->getPost(); $form = new RegisterForm(); $form->setData($post); if (!$form->isValid()) { $model = new ViewModel(array('error' => true, 'form' => $form)); $model->setTemplate('leads/leads/index'); return $model; } $this->createUser($form->getData()); return $this->redirect()->toRoute(NULL, array('controller' => 'Create', 'action' => 'confirm')); }