• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed "User has posted no more than X messages" criteria does not work correctly

Affected version


XenForo developer
Staff member
In 2.0.0, this criteria always fails to match. To resolve this, find the following in src/XF/Critera/User.php:
protected function _matchLikeCount(array $data, \XF\Entity\User $user)
Add this code before it:
    protected function _matchMessagesMaximum(array $data, \XF\Entity\User $user)
        return ($user->message_count <= $data['messages']);
This criteria will now match as expected in notices, promotions and trophies.