Can't Seem to get User Criteria Working...

Jaxel

Well-known member
I'm trying to set up a user criteria setting for my Discord Integration. Currently I have it set to show a NOTICE:

1.webp

Unfortunately, it doesn't seem to work... Don't know why.

Code:
<?php

class EWRdiscord_Listener_Criteria
{
    public static function userMatchesCriteria($rule, array $data, array $user, &$returnValue)
    {
        switch ($rule)
        {
            case 'discord':
                if (empty($user['externalAuth']['discord']))
                {
                    $returnValue = false;
                }
                break;
        }
    }
}
 
Nevermind, figured it out. The return must be the OPPOSITE of the criteria helper. The criteria helper returns falses, the listener has to return trues.
 
Back
Top Bottom