summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Dauvergne <bdauvergne@entrouvert.com>2011-01-26 14:03:32 (GMT)
committerBenjamin Dauvergne <bdauvergne@entrouvert.com>2011-01-26 14:03:32 (GMT)
commitcfbfd45577c76897937aee1407ce21cfcb323a41 (patch)
treea68a1dc21ce6523633579808afb04c05c6b00f37
parent90aba1cedab880e4c30d7e044ae59d8c4d9966fe (diff)
downloadsamlauth-elgg-cfbfd45577c76897937aee1407ce21cfcb323a41.zip
samlauth-elgg-cfbfd45577c76897937aee1407ce21cfcb323a41.tar.gz
samlauth-elgg-cfbfd45577c76897937aee1407ce21cfcb323a41.tar.bz2
Convert birthday string to UNIX timestamp
-rw-r--r--start.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/start.php b/start.php
index 26b309c..2b1e2a0 100644
--- a/start.php
+++ b/start.php
@@ -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'];