Beispiel #1
0
 protected function handleRequestInner()
 {
     if ($this->request->get_method() == 'POST') {
         $info = $this->account->getAccountInfo($this->accountname, $this->password);
         if (is_array($info)) {
             $account_info = $info['accountname'] . ':' . $info['id'] . ':' . $info['is_admin'] . ':' . $info['supplier'] . ':' . $this->apf->get_config('aes_iv');
             $crypted_account_info = $this->crypt_util->aes_encode($this->apf->get_config('aes_private_key'), $this->apf->get_config('aes_iv'), $account_info);
             $this->response->set_cookie('account_info', $crypted_account_info);
             $this->response->redirect('/data', false, false);
             return false;
         } else {
             if ($info == Service_Account::ERROR_INVALID_ACCOUNT) {
                 $this->error['accountname'] = true;
             } else {
                 if ($info == Service_Account::ERROR_INVALID_PASSWORD) {
                     $this->error['password'] = true;
                 }
             }
         }
     }
     return array('Supplier_Channel_Login', array('error' => $this->error));
 }