Skip to main content
Version: 1.20.1

SimpleUserCriteria

This server-side class provides a method that helps to interact with the User Criteria.

SimpleUserCriteria()


Use this constructor to create an instance of the SimpleUserCriteria class.

SimpleUserCriteria()
const uc = new SimpleUserCriteria();

userAcceptanceByCriteria(user, criteria)


Use this method to check if the user fits the criteria specified.

Parameter(s):

NameTypeMandatoryDefault value
userStringYN
criteriaString/ArrayYN
excludeDelegationBooleanNfalse
tip

The criteria parameter may be specified as an array of strings, as shown in the second code example.

Return:

TypeDescription
BooleanThis method returns true if the user matches the criteria specified; otherwise, it returns false.

Examples:

userAcceptanceByCriteria() with the String criteria
const uc = new SimpleUserCriteria();
ss.info(uc.userAcceptanceByCriteria(ss.getUserID(), '158617888715304763'));
// Info: true
userAcceptanceByCriteria() with the Array criteria
const uc = new SimpleUserCriteria();
ss.info(uc.userAcceptanceByCriteria(ss.getUserID(), ['158617888715304763', '158617888715304765']));
// Info: false