I thought i worked out all of the bugs but but missed this and the site is now live.
For some reason when a new member registers with WebLoginPE their date of birth does not get saved.
I have this as a required field on the registration form and the field checking does work, it just wont save the field to the database. After registration a user would need to login and go to the profile editor in order to get the date to stick.
Why wouldn’t the date save on registration? I’ve looked all around and could not find a solution. I know that there are some other date of birth problems in the bugs thread, some of which seem similar but I don’t see any fixes. The variable is passed to the form processor since if a required field is missing it will auto-fill in the dob field with what the user filled in. I looked at the webloginpe.class php file but can’t seem to make heads or tails of it.
Thanks in advance
-Brian
-- added --
Turns out the dob field isn’t being converted to a unix timestamp. I added an echo $dob before and after the data gets inserted into the database and both of them display as they are entered.
To temporarily fix this i added the following code on line 589 to the class.php file.
$doba = explode('-',$dob);
$tempmonth = $doba[1];
$tempday = $doba[0];
$tempyear = $doba[2];
$tempunix_timestamp = mktime(0,0,0, $tempmonth, $tempday, $tempyear);
$dob = $tempunix_timestamp;
//nothing was changed below this
$newUserAttr = "INSERT INTO ".$web_user_attributes.
" (internalKey, fullname, email, phone, mobilephone, dob, gender, country, state, zip, fax, photo, comment) VALUES".
" ('".$key."', '".$fullname."', '".$email."', '".$phone."', '".$mobilephone."', '".$dob."', '".$gender."', '".$country."', '".$state."', '".$zip."', '".$fax."', '".$photo."', '".$comment."')";
$insertUserAttr = $modx->db->query($newUserAttr);
This seemed to fix the problem although I don’t know if it is the best way to do so.