original_string: public function operatorAuthor(Query $query, TokenInterface $token)
      {
          $value = explode(',', $token->value());
  
          if (!empty($value)) {
              $conjunction = $token->negated() ? 'NOT IN' : 'IN';
              $subQuery = TableRegistry::get('User.Users')->find()
                  ->select(['id'])
                  ->where(["Users.username {$conjunction}" => $value]);
  
              if ($token->where() === 'or') {
                  $query->orWhere(['Contents.created_by IN' => $subQuery]);
              } elseif ($token->where() === 'and') {
                  $query->andWhere(['Contents.created_by IN' => $subQuery]);
              } else {
                  $query->where(['Contents.created_by IN' => $subQuery]);
              }
          }
  
          return $query;
      }
code: public function operatorAuthor(Query $query, TokenInterface $token)
      {
          $value = explode(',', $token->value());
  
          if (!empty($value)) {
              $conjunction = $token->negated() ? 'NOT IN' : 'IN';
              $subQuery = TableRegistry::get('User.Users')->find()
                  ->select(['id'])
                  ->where(["Users.username {$conjunction}" => $value]);
  
              if ($token->where() === 'or') {
                  $query->orWhere(['Contents.created_by IN' => $subQuery]);
              } elseif ($token->where() === 'and') {
                  $query->andWhere(['Contents.created_by IN' => $subQuery]);
              } else {
                  $query->where(['Contents.created_by IN' => $subQuery]);
              }
          }
  
          return $query;
      }
code_tokens: public function operatorAuthor ( Query $ query , TokenInterface $ token ) { $ value = explode ( ',' , $ token -> value ( ) ) ; if ( ! empty ( $ value ) ) { $ conjunction = $ token -> negated ( ) ? 'NOT IN' : 'IN' ; $ subQuery = TableRegistry :: get ( 'User.Users' ) -> find ( ) -> select ( [ 'id' ] ) -> where ( [ "Users.username {$conjunction}" => $ value ] ) ; if ( $ token -> where ( ) === 'or' ) { $ query -> orWhere ( [ 'Contents.created_by IN' => $ subQuery ] ) ; } elseif ( $ token -> where ( ) === 'and' ) { $ query -> andWhere ( [ 'Contents.created_by IN' => $ subQuery ] ) ; } else { $ query -> where ( [ 'Contents.created_by IN' => $ subQuery ] ) ; } } return $ query ; }
docstring: Handles "author" search operator.
  
  author:<username1>,<username2>, ...
  
  @param \Cake\ORM\Query $query The query object
  @param \Search\Parser\TokenInterface $token Operator token
  @return \Cake\ORM\Query
docstring_tokens: Handles author search operator .