Back to vBulletin 4.x Add-ons

Change COPPA Minimum Age
Mod Version: 1.00, by |Jordan|

vB Version: 4.0.x Rating: (5 votes - 5.00 average) Installs: 31
Released: 10 Sep 2010 Last Update: Never Downloads: 0
Not Supported Code Changes  

The COPPA of vBulletin is a great way to prevent under aged user's from registering on your forum, but its hard coded to 13 years of age.

With this simple file edit, you can change this number to anything.

For vB 4.x:

In register.php around line 121 replace 13 with whatever age you want (eg. 18)

PHP Code:
if ($vbulletin->GPC['year'] < 1970 OR (mktime(000$vbulletin->GPC['month'], $vbulletin->GPC['day'], $vbulletin->GPC['year']) <= mktime(000$current['month'], $current['day'], $current['year'] - 13))) 
For vB 3.8.x:

In register.php at line 174 replace 13 with whatever age you want (eg. 18)

PHP Code:
if ($year 1970 OR (mktime(000$month$day$year) <= mktime(000$current['month'], $current['day'], $current['year'] - 13))) 
For this to work, you need to have the COPPA system enabled. In AdminCP options->User Registration, make sure "You should also have "Deny registration for users aged under 13 years" is set and also enable the "COPPA Registration System Cookie Check".

If you want to change the message that is shown to underage users, the phrase varname is "under_thirteen_registration_denied".

mmfgamer5 pointed out that if you want to use the COPPA cookie option to prevent users from registering if they are below the age you set you need to do some additional steps. See the post here

Spoiler (click to open)


This works with the "COPPA Registration System Cookie Check" option enabled if you change all 3 instances of the '13' (in the code; there are 2 instances in comments), rather than just the one. For vB4.1.7, the code instances of '13' are on lines 121, 206 and 867. The comment instances of '13' are on lines 134 and 868.

Close

Download

No files for download.


vblts.ru supports vBulletin®, 2022-2024