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!
I would love to be able to do something like:
...and iterate over a collection of
Timber\Userobjects. I believe the closest I can get to this currently is by executing a rawWP_User_Queryand mapping each object to aTimber\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!