Example #1
0
 public function logincheckAction()
 {
     $re = array("returncode" => ReturnCode::$SYSERROR);
     $request = $this->getRequest();
     $login_account = $request->get("login_account");
     $password = $request->get("password");
     $comefrom = $request->get("comefrom");
     $datascope = $request->get("datascope");
     //登录成功后,顺便返回的数据范围,以加快客户端速度。暂时支持none(返回登录成功必须信息)\all(返回当前登录人的信息及好友列表数据)
     $portalversion = $request->get("portalversion");
     if (empty($datascope)) {
         $datascope = "";
     }
     if (empty($comefrom)) {
         $comefrom = "00";
     }
     $this->get('logger')->err("login_account.>>>>>>>>>>>>>>>>>>>{$login_account}");
     $this->get('logger')->err("password.>>>>>>>>>>>>>>>>>>>{$password}");
     $this->get('logger')->err("comefrom.>>>>>>>>>>>>>>>>>>>{$comefrom}");
     $request->getSession()->set('comefrom', $comefrom);
     $authController = new SsoUserAuthController();
     $authController->setContainer($this->container);
     $re = $authController->dispatchAction($this, $login_account, $password, $comefrom, $datascope, $portalversion);
     $response = new Response($request->get('jsoncallback') ? $request->get('jsoncallback') . "(" . json_encode($re) . ");" : json_encode($re));
     $response->headers->set('Content-Type', 'text/json');
     return $response;
 }
 public function autologin($login_account, $password, $comefrom)
 {
     $authController = new SsoUserAuthController();
     $authController->setContainer($this->container);
     return $authController->dispatchAction($this, $login_account, $password, $comefrom, "all", "");
 }