Mellow1234
Member
I'm getting this error:
LogicException: Unknown relation User accessed on xf_user_field_value in src/XF/Mvc/Entity/Finder.php at line 651
with the code below, is there something I have to do to define the relation? I was assuming that one just exists via user_id.
LogicException: Unknown relation User accessed on xf_user_field_value in src/XF/Mvc/Entity/Finder.php at line 651
with the code below, is there something I have to do to define the relation? I was assuming that one just exists via user_id.
PHP:
<?php
namespace Mileage;
class Mileage
{
public static function getMileage(\XF\Pub\Controller\AbstractController $controller, \XF\Mvc\Reply\AbstractReply &$reply)
{
$finder = \XF::finder('XF:UserFieldValue')
->with('User',true)
->where('field_id', '=', 'miles')
->where('field_value', '>', 0)
->order('field_value', 'DESC');
$users = $finder->fetch();
$reply->setParams(['users' => $users]);
}
}
Last edited: