XF 2.0 Finder - Custom Userfield question

Mellow1234

Member
I have a custom userfield 'miles'
I'd like to present a page with every member that has a value in that field in descending order.

I'm still new at this so don't laugh too hard. I think this finder will work and do the xf_user to xf_userfield_value join I need.

<?php
$dir = __DIR__;
require($dir . '/src/XF.php');

$finder = XF::finder('XF:user_field_value')'
$userField = $finder->with('User', true->where('field_id', '=', 'miles')->where('field_vlaue','>','0',)->order('miles','DESC')->fetch();

>
 
Back
Top Bottom