Convert birthday string to UNIX timestamp

This commit is contained in:
Benjamin Dauvergne 2011-01-26 15:03:32 +01:00
parent 90aba1ceda
commit cfbfd45577
1 changed files with 7 additions and 1 deletions

View File

@ -84,7 +84,13 @@
$user->name = $elgg_user['name'];
$user->email = $elgg_user['email'];
$user->ldapDN = $elgg_user['ldapDN'];
$user->birthday = $elgg_user['birthday'];
$bday = strptime($elgg_user['birthday'], '%d/%m/%Y');
if ($bday != FALSE) {
$user->birthday = mktime(0,0,0,
$bday['tm_mday'],
$bday['tm_mon'],
$bday['tm_year']);
}
$user->ircem = $elgg_user['ircem'];
$user->urssaf = $elgg_user['urssaf'];
$user->address = $elgg_user['address'];