Finder total() returns 0

F

Finexes

Guest
Member
Hey guys,

I'm trying to get the number of users with XenForo's finder, but it always returns 0:
PHP:

Code:
$finder = \XF::finder('XF:User');
$countUsers = $finder->where('custom_title', 'LIKE', 'String%')->total();
// returns 0

Although the same query returns the correct amount in phpMyAdmin:
SQL:

Code:
SELECT * FROM `xf_user` WHERE `custom_title` LIKE 'String%';

// returns 3 results

What am I doing wrong?
 
BlackSpigot General Chat
Rules Help Users
    C @ CuteBunny765: Download kese karo is ko
    Top