/** Activate an account * @access public * @return void */ public function activateAction() { if (!is_null($this->_auth->getIdentity())) { $this->redirect('users/account/'); } $form = new ActivateForm(); $this->view->form = $form; if ($this->getRequest()->isPost() && $form->isValid($this->_request->getPost())) { if ($form->isValid($form->getValues())) { $this->_users->activate($form->getValues()); $this->getFlash()->addMessage('Your account has been activated.'); $this->redirect('users/account/success/'); } else { $form->populate($form->getValues()); $this->getFlash()->addMessage('Please review and correct problems'); } } }