original_string: public function logout(HTTPRequest $request)
      {
          $email = $request->requestVar('email');
          $member = Member::get()->filter(array('Email' => $email))->first();
  
          if ($member) {
              //logout
              $member->logout();
  
              if ($this->tokenConfig['owner'] === Member::class) {
                  //generate expired token
                  $tokenData = $this->generateToken(true);
  
                  //write
                  $tokenDBColumn = $this->tokenConfig['DBColumn'];
                  $expireDBColumn = $this->tokenConfig['expireDBColumn'];
  
                  $member->{$tokenDBColumn} = $tokenData['token'];
                  $member->{$expireDBColumn} = $tokenData['expire'];
                  $member->write();
              }
          }
      }
code: public function logout(HTTPRequest $request)
      {
          $email = $request->requestVar('email');
          $member = Member::get()->filter(array('Email' => $email))->first();
  
          if ($member) {
              //logout
              $member->logout();
  
              if ($this->tokenConfig['owner'] === Member::class) {
                  //generate expired token
                  $tokenData = $this->generateToken(true);
  
                  //write
                  $tokenDBColumn = $this->tokenConfig['DBColumn'];
                  $expireDBColumn = $this->tokenConfig['expireDBColumn'];
  
                  $member->{$tokenDBColumn} = $tokenData['token'];
                  $member->{$expireDBColumn} = $tokenData['expire'];
                  $member->write();
              }
          }
      }
code_tokens: public function logout ( HTTPRequest $ request ) { $ email = $ request -> requestVar ( 'email' ) ; $ member = Member :: get ( ) -> filter ( array ( 'Email' => $ email ) ) -> first ( ) ; if ( $ member ) { //logout $ member -> logout ( ) ; if ( $ this -> tokenConfig [ 'owner' ] === Member :: class ) { //generate expired token $ tokenData = $ this -> generateToken ( true ) ; //write $ tokenDBColumn = $ this -> tokenConfig [ 'DBColumn' ] ; $ expireDBColumn = $ this -> tokenConfig [ 'expireDBColumn' ] ; $ member -> { $ tokenDBColumn } = $ tokenData [ 'token' ] ; $ member -> { $ expireDBColumn } = $ tokenData [ 'expire' ] ; $ member -> write ( ) ; } } }
docstring: Logout a user from framework
  and update token with an expired one
  if token owner class is a Member
  
  @param  HTTPRequest   $request    HTTP request containing 'email' var
docstring_tokens: Logout a user from framework and update token with an expired one if token owner class is a Member