We create 2 dummy fields that are not updatable to store the repeated fields. When we save the registered values, we compare the $HTTP_POST_VARS values. If the email and passwords to not match, we set $gBAD to true.
We can control which fields are saved into the database using the eventPreInsertField property. Every field that is meant to be updated is passed to the function (CheckInsertField) defined by this property.
CheckInsertField() returns -1 to skip processing of the dummy fields, 0 to stop the Insert, and 1 to indicate continue processing normally. We use the $lens->Error() function to pass an error message to the user.