PDA

View Full Version : Users under 18 automatically sent to usergroup


Neo_obs
07-31-2006, 06:28 AM
We are implementing age groups for people under 18 they get different features and we are hoping this solves some of our problems. What I am asking for is a mod that will automatically place a user in a certain usergroup if they are under 18 and when they turn 18 automatically place them into the normal field.

I know people can change their age this is not a big concern we just want to have this.

right now we are using 3.5.0 and have no plans to upgrade to 3.6 untill we can update our other server settings

we use php 4.3.1
and MySQL 3.23.58
with apache 2.0.5

al help is greatly appreciated thank you.

Neo_obs
08-01-2006, 07:25 AM
ok if this cant be done is there something that will force users to enter their Birthdate before using the forums?

rogersnm
08-01-2006, 07:53 AM
just activate it in the vb options for registration and then set up a cron job or something that moves them to another usergroup depending on the DOB

Neo_obs
08-02-2006, 05:36 AM
and how would i make that?

rogersnm
08-02-2006, 05:38 AM
/me goes and powers up his dev board

Neo_obs
08-02-2006, 05:52 AM
would this work?

// Get the value for field 11
$user = $db->query_first("
SELECT field11
FROM " . TABLE_PREFIX . "userfield
WHERE userid = " . $vbulletin->userinfo['userid'] . "
");

if ($user['field11'] == 'No')
{
$userdata->set('usergroupid', 18);
}

the way we are running it now is everyone enters if they are over 18 or under and we use amy's hack to put them in on registration

so if i use that above (which is amy's hack) would it do the same thing but to everyone?

rogersnm
08-02-2006, 09:15 AM
look pretty good to me.