Пример #1
0
 public function logout($request, $response, $args)
 {
     Auth::logout();
     return $this->redirect($response, '/auth/login');
 }
Пример #2
0
 public function logout()
 {
     Auth::logout();
 }
Пример #3
0
 public function logout($request, $response, $args)
 {
     Auth::logout();
     $newResponse = $response->withStatus(302)->withHeader('Location', '/auth/login');
     return $newResponse;
 }
Пример #4
0
 public function handleKill($request, $response, $args)
 {
     $user = Auth::getUser();
     $passwd = $request->getParam('passwd');
     // check passwd
     $res = array();
     if (!Hash::checkPassword($user->pass, $passwd)) {
         $res['ret'] = 0;
         $res['msg'] = " 密码错误";
         return $this->echoJson($response, $res);
     }
     Auth::logout();
     $user->delete();
     $res['ret'] = 1;
     $res['msg'] = "GG!您的帐号已经从我们的系统中删除.";
     return $this->echoJson($response, $res);
 }
Пример #5
0
 public function logout()
 {
     $this->_methodName = 'logout';
     $this->resolveParams();
     $this->checkAuth();
     Auth::logout();
     return $this;
 }