original_string: public function getOwner(HTTPRequest $request)
      {
          $owner = null;
  
          //get the token
          $token = $request->getHeader($this->tokenConfig['header']);
          if (!$token) {
              $token = $request->requestVar($this->tokenConfig['queryVar']);
          }
  
          if ($token) {
              $SQLToken = Convert::raw2sql($token);
  
              $owner = DataObject::get_one(
                  $this->tokenConfig['owner'],
                  "\"" . $this->tokenConfig['DBColumn'] . "\"='" . $SQLToken . "'",
                  false
              );
  
              if (!$owner) {
                  $owner = null;
              }
          }
  
          return $owner;
      }
code: public function getOwner(HTTPRequest $request)
      {
          $owner = null;
  
          //get the token
          $token = $request->getHeader($this->tokenConfig['header']);
          if (!$token) {
              $token = $request->requestVar($this->tokenConfig['queryVar']);
          }
  
          if ($token) {
              $SQLToken = Convert::raw2sql($token);
  
              $owner = DataObject::get_one(
                  $this->tokenConfig['owner'],
                  "\"" . $this->tokenConfig['DBColumn'] . "\"='" . $SQLToken . "'",
                  false
              );
  
              if (!$owner) {
                  $owner = null;
              }
          }
  
          return $owner;
      }
code_tokens: public function getOwner ( HTTPRequest $ request ) { $ owner = null ; //get the token $ token = $ request -> getHeader ( $ this -> tokenConfig [ 'header' ] ) ; if ( ! $ token ) { $ token = $ request -> requestVar ( $ this -> tokenConfig [ 'queryVar' ] ) ; } if ( $ token ) { $ SQLToken = Convert :: raw2sql ( $ token ) ; $ owner = DataObject :: get_one ( $ this -> tokenConfig [ 'owner' ] , "\"" . $ this -> tokenConfig [ 'DBColumn' ] . "\"='" . $ SQLToken . "'" , false ) ; if ( ! $ owner ) { $ owner = null ; } } return $ owner ; }
docstring: Returns the DataObject related to the token
  that sent the authenticated request
  
  @param  HTTPRequest          $request    HTTP API request
  @return null|DataObject                     null if failed or the DataObject token owner related to the request
docstring_tokens: Returns the DataObject related to the token that sent the authenticated request