8
Criteria is an object provided by the core to specify which records to retrieve. It has a big brother in the
CriteriaCompo object.
Most database handlers provided in XOOPS utilize these objects to provide a consistant mechanism of retrieving records from the db.
The code:
new Criteria('level', 0, '>')
creates a new criteria object and passes 'level', 0, and '>' as parameters to the object's
constructor function.
Simply we are telling the database to return the number of user records
WHERE level > 0. Those that have worked with SQL queries in the past will be familiar with this construct. XOOPS stores a value in the {your_prefix}_users table, level, with the following values:
0 - user has registered but not confirmed registration
1 - user has confirmed registration