• 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
2.0.0

Mike

XenForo developer
Staff member
#1
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.