Quote:
Originally Posted by ccplim
Is there a way where we can restrict new member to enter the birth year range from something like 1900 to 2005 during registration?
I have some joker members who enter their birth year by entering 0000 or some funny number :disappointed:
|
If you open 'register.php' in your install directory './' you can change the regex to what you want to use! I would just use 19?? as there should not be anyone 5 years old trying to register on any forum!
Here is how to do this....
Open register.php
FIND THIS....
Code:
if ($month == 0 OR !preg_match('#^\d{4}$#', $year))
{
eval(print_standard_error('select_valid_month_and_year'));
}
REPLACE WITH...
Code:
if ( $month == 0 OR ! preg_match ( "!^(19[0-9]{2}|200[0-5]{1})$!", $year ) )
{
eval ( print_standard_error ( 'select_valid_month_and_year' ) );
}
Sonia