Change COPPA Minimum Age
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(0, 0, 0, $vbulletin->GPC['month'], $vbulletin->GPC['day'], $vbulletin->GPC['year']) <= mktime(0, 0, 0, $current['month'], $current['day'], $current['year'] - 13)))
In register.php at line 174 replace 13 with whatever age you want (eg. 18) PHP Code:
if ($year < 1970 OR (mktime(0, 0, 0, $month, $day, $year) <= mktime(0, 0, 0, $current['month'], $current['day'], $current['year'] - 13)))
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. |