Skip to content

Feature Request: UserQuery class #1689

@acobster

Description

@acobster

I would love to be able to do something like:

$users = new Timber\UserQuery([
  'role' => 'my-custom-role'
]);

...and iterate over a collection of Timber\User objects. I believe the closest I can get to this currently is by executing a raw WP_User_Query and mapping each object to a Timber\User, but it would be really nice to be able to do this directly.

I'd love to get started on a PR for this, as this would be valuable for a number of projects I'm working on. But I could see this being a non-trivial undertaking so wanted to get your thoughts first.

Thanks!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions