Adult and PIOF checking - lickx/opensim-lickx GitHub Wiki

UserFlags

If we look at this document we can see that some flags related to land access can be set for users:

  • 4 (0x04): The avatar has provided payment info and is therefore identified (user profile will show Payment info on file)
  • 8 (0x08): The avatar has made at least one successful payment using their payment info (user profile will show Payment info used)
  • 32 (0x20): The avatar has been age verified using some external service (like LL's Aristotle). (this flag isn't visible on the user profile)

Note that nowadays, Linden Lab sets the age verified flag by default as long as a birth date of 18 or older is filled in when creating a new avatar.

I personally consider a user 18+ if they have payment info on file AND used, because there are no payment processors (paypal, credit card etc) anymore that allow minors to use their service. So when a user made a payment (region rental, or a symbolic USD 1,- for verification etc), I would set all 3 flags on that user. Thus for restricting land access to adults, PIOF is sufficient (see below).

This UserFlags field resides in the UserAccounts table and is by default 0 for all user accounts

We can set these flags with mariadb/mysql; note that the following SQL statements REPLACE whatever the UserFlags was before for the given user:

Payment info on file only (4):

update UserAccounts SET UserFlags = 4 WHERE FirstName='Test' AND LastName='User';

Payment info on file and used (4+8):

update UserAccounts SET UserFlags = 12 WHERE FirstName='Test' AND LastName='User';

Adult verified only (32):

update UserAccounts SET UserFlags = 32 WHERE FirstName='Test' AND LastName='User';

All three flags (4+8+32):

update UserAccounts SET UserFlags = 44 WHERE FirstName='Test' AND LastName='User';

Using the flags in land access management

Land access can be restricted to:

  • 18+ Adult verified
  • Payment info on file (PIOF)

In OpenSim/lickx, this can be enforced for both estate and parcel access. When visitors who don't meet the conditions try to access a parcel with these flags, they will see and bump into banlines. On upstream OpenSim, the flags can only be enforced for estates, not parcels.

Caution: The adult verified and PIOF flags of hypergrid visitors are not visible to a simulator. That means hypergrid visitors will always be blocked out of parcels that require PIOF and/or 18+. (Besides, most grids don't even set those flags accordingly on their users). Another reason to ditch the hypergrid!

Using the flags in scripted objects

Get the status using llRequestAgentData().

Caution: the constants PAYMENT_INFO_ON_FILE and PAYMENT_INFO_USED are only defined in OpenSim/lickx, use their numeric equivalents (resp. 1 and 2) if scripts are to be run on upstream OpenSim (such as in attachments)
Caution2: The result of DATA_PAYINFO will only return a meaningful value for local grid users, for hypergrid users it will always return 0 (aka no PIOF)

default
{
    touch_end(integer i)
    {
        key kID = llDetectedKey(0);
        llRequestAgentData(kID, DATA_PAYINFO);
    }
    
    dataserver(key kRequest, string sData)
    {
        integer i = (integer)sData;
        if (i & PAYMENT_INFO_ON_FILE) llOwnerSay("Payment info on file");
        if (i & PAYMENT_INFO_USED) llOwnerSay("Payment info used");
    }
}

There exists no scripted method to find out if someone is age verified, not even in Second Life.