<p>Called while testing a user against user criteria in \XF\Criteria\User::isMatch() for trophies, notices etc.</p>

<p>Callback signature:</p>
<blockquote><code>$rule, <em>array</em> $data, <em>\XF\Entity\User</em> $user, &amp;$returnValue</code></blockquote>

<p>Arguments:</p>
<ol>
	<li><code><em>string</em> $rule</code> - text identifying the criteria that should be checked.</li>
	<li><code><em>array</em> $data</code> - data defining the conditions of the criteria.</li>
	<li><code><em>\XF\Entity\User</em> $user</code> - user entity object to be used in the criteria checks.</li>
	<li><code><em>boolean</em> &amp;$returnValue</code> - the event code should set this to <b>true</b> if a criteria check matches.</li>
</ol>

<p>Example:</p>
<pre>public static function criteriaUser($rule, array $data, \XF\Entity\User $user, &amp;$returnValue)
{
	switch ($rule)
	{
		case 'foo_field':
		if ($user['foo_field'] == $data['foo'])
		{
			$returnValue = true;
		}
		break;
		
		case 'bar_field':
		if ($user['bar_field'] == $data['bar_value'])
		{
			$returnValue = true;
		}
		break;
	}
}</pre>