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

Mike

XenForo developer
Staff member
Affected version
2.0.0
In 2.0.0, this criteria always fails to match. To resolve this, find the following in src/XF/Critera/User.php:
Code:
protected function _matchLikeCount(array $data, \XF\Entity\User $user)
Add this code before it:
Code:
    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.
 
Top Bottom