[]... Dave's grab birthday fields ... grab the month, day and year, as separate fields ...[/]
In the changes to adduser.php in Grab Birthdate 1.0.0:
// Store birthdate (part 3 of 2). <br /> ... <br /> @list($dob, $dob_crc) = explode('-', $dob_with_crc); <br /> if (!$dob or ...) { <br /> $html -> not_right('dob invalid', $Cat); <br /> } <br /> [:"red"]$year = substr($dob, 0, 4); <br /> $month = substr($dob, 4, 2); <br /> $day = substr($dob, 6, 2); <br /> if (!checkdate($month, $day, $year)) { <br /> $html -> not_right('dob invalid (2)', $Cat); <br /> }[/] <br /> <br />// ---------------------------------- <br />// Insert this user into the database <br /> $query = " <br /> INSERT INTO {$config['tbprefix']}Users (...) <br /> VALUES (...) <br /> "; <br /> $dbh -> do_query($query);
The above is untested, but should work.
The added call to checkdate() is not essential, since the date has already been checked, but might be worthwhile in the event that some of the other code for this hack were to get changed.
The INSERT INTO would also have to be modified to insert $year, $month and $day instead of, or in addition to, $dob.
I was going to stick a delimiter into the DOB query string parameter so that explode() could be used, rather than substr(), but I'm already using "-", and I couldn't think of a different one.