Example #1
0
 public function logout($request, $response, $args)
 {
     Auth::logout();
     return $this->redirect($response, '/auth/login');
 }
Example #2
0
 public function logout()
 {
     Auth::logout();
 }
Example #3
0
 public function logout($request, $response, $args)
 {
     Auth::logout();
     $newResponse = $response->withStatus(302)->withHeader('Location', '/auth/login');
     return $newResponse;
 }
Example #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);
 }
Example #5
0
 public function logout()
 {
     $this->_methodName = 'logout';
     $this->resolveParams();
     $this->checkAuth();
     Auth::logout();
     return $this;
 }