If this doesn’t help, what should I do then?
Symptom:
During User Registration date was being saved as a single int instead of a full unix time stamp as expected.
Cause:
After reading the register function I noticed that MakeDateForDb was never called
Snippet call:
WebLoginPE? &type=`register` ®Type=`instant`
Quick Fix:
Open webloginpe.class.php
Around line 583 look for:
// If all that crap checks out, now we can create the account.
Just above it place:
///credit: W. Shawn Wilkerson: process dates into proper unix timestamp if ($dob!='') // don't try to format an empty string. { $dob = $this->MakeDateForDb($dob); }
There may be a better place for this change, but I’ll leave that up to Scotty for the next version.
If this was already mentioned, 45 minutes of searching did not show it.
Hope this helps someone
include_once '/ABSOLUTE/PATH/TO/LANG/FILE/assets/snippets/webloginpe/lang/'.$lang.'.php';
Quote from: wshawn at Dec 21, 2007, 08:21 AMIf this doesn’t help, what should I do then?
Symptom:
During User Registration date was being saved as a single int instead of a full unix time stamp as expected.
Cause:
After reading the register function I noticed that MakeDateForDb was never called
Snippet call:
WebLoginPE? &type=`register` ®Type=`instant`
Quick Fix:
Open webloginpe.class.php
Around line 583 look for:
// If all that crap checks out, now we can create the account.
Just above it place:
///credit: W. Shawn Wilkerson: process dates into proper unix timestamp if ($dob!='') // don't try to format an empty string. { $dob = $this->MakeDateForDb($dob); }
There may be a better place for this change, but I’ll leave that up to Scotty for the next version.
If this was already mentioned, 45 minutes of searching did not show it.
Hope this helps someone
Edit: Sorry, I was messing up the versions of my class.php files.
The above fix is working just fine!
$dob = $modx->db->escape($modx->stripTags($_POST['dob']));
$dob = strtotime($dob);