/**
  * Create account
  */
 public function createAction()
 {
     $db = $this->db;
     $account = new AccountsModule();
     $form = new CreateAccount();
     $form->setAction($this->_helper->url('create', 'account', 'default'));
     if ($this->_request->isPost()) {
         if ($form->isValid($_POST)) {
             $accountId = $account->create($form->getValues());
             $this->_helper->FlashMessenger('Account was created successfully');
             $url = $this->view->url(array('module' => 'default', 'controller' => 'account', 'action' => 'viewdetails', 'id' => $id), null, true);
             $this->_redirect($url);
             $this->view->message = "Account was created successfully";
         } else {
             $form->populate($_POST);
             $this->view->form = $form;
         }
     } else {
         $this->view->form = $form;
     }
 }