Example #1
0
 public function run()
 {
     $em = $this->getParentController()->getRequest()->getFiltered('em');
     if ($em) {
         $blob = Am_Di::getInstance()->store->getBlob(Am_Form_Signup_Action_SendEmailCode::STORE_PREFIX . $em);
         if (preg_match('/^\\d+$/', $blob)) {
             $user = Am_Di::getInstance()->userTable->load($blob);
             $this->getParentController()->redirectLocation(REL_ROOT_URL . '/login', ___("Your account has been successfully created"), ___("Please login to your account"));
             return;
         }
         if ($blob) {
             $this->restoreStateAfterEmailVerification($em);
         } else {
             throw new Am_Exception_InputError(___("Wrong code or code expired - please start signup process again"));
         }
     } else {
         return parent::run();
     }
 }