diff --git a/application/default/controllers/AccountController.php b/application/default/controllers/AccountController.php index 16190f86..5dacba04 100755 --- a/application/default/controllers/AccountController.php +++ b/application/default/controllers/AccountController.php @@ -3,6 +3,7 @@ use Helpers\View; use Helpers\Curl; use Users\Member; use Users\Account; +use Users\Users; class AccountController extends Zend_Controller_Action { @@ -398,10 +399,21 @@ class AccountController extends Zend_Controller_Action $data = $curl->request($url,array('data'=>$encoded_param),"POST"); $KEY = \Helpers\MCrypt::decrypt($data['response'],"CH6668"); - $cache_data = json_decode($KEY,true); - view::Dump($cache_data,false); - $host = $_SERVER['SERVER_NAME']; - view::Dump($host,false); + $cache_data = json_decode($KEY); + if (isset($cache_data -> error)) + { + $this->view->error =$cache_data -> error; + return; + } + $Users = new Users(); + if(!$Users -> storeNewAuthCredential($cache_data)) + { + $this-> view->error ="登录失败,请重新登录。"; + return; + }else{ + + view::Post($this,"登录成功!",$tohref); + } return true; }