public function indexAction()
 {
     $this->view->headTitle('Open Analytics Project | Login');
     $userform = new Form_User();
     $this->view->userform = $userform->replaceSubmitLabel('Login');
     $siteform = new Form_Site();
     $this->view->siteform = $siteform->replaceSubmitLabel('Step 2 >');
     if ($this->_request->isPost() && !is_null($this->_request->getParam('sitesubmit'))) {
         if (!$siteform->isValid($this->_request->getPost())) {
             $this->view->errors = $siteform->getErrors();
         } else {
             $namespace = new Zend_Session_Namespace('signup');
             $namespace->sitename = $siteform->getValue('sitename');
             $namespace->siteurl = $siteform->getValue('siteurl');
             $this->_redirect("/registration/step2");
         }
     }
     $this->view->headScript()->appendFile($this->view->public . '/js/auth.js');
 }
 public function step2Action()
 {
     $namespace = new Zend_Session_Namespace('signup');
     if (!is_null($namespace->sitename) && !is_null($namespace->siteurl)) {
         $userform = new Form_User();
         $userform->addRepeatPassword();
         $userform->setAction('/registration/step2');
         $userform->addDBNoRecordExistsValidator();
         if ($this->_request->isPost()) {
             if ($userform->isValid($this->_request->getPost())) {
                 $namespace->email = $userform->getValue('email');
                 $namespace->password = $userform->getValue('password');
                 $this->_redirect('/registration/step3');
             }
         }
         $this->view->userform = $userform->replaceSubmitLabel("Step 3 >");
         $this->view->sitename = $namespace->sitename;
         $this->view->siteurl = $namespace->siteurl;
     } else {
         $this->_redirect('/auth');
     }
 }