Created
February 10, 2012 17:44
-
-
Save Mark-H/1791195 to your computer and use it in GitHub Desktop.
Prehook for Login.UpdateProfile for proper DOB support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $dob = $hook->getValue('dob'); | |
| if (!empty($dob)) { | |
| $dob = strtotime($dob); | |
| if (!$dob) { | |
| $hook->setValue('dob',0); | |
| } else { | |
| $hook->setValue('dob',$dob); | |
| } | |
| } else { | |
| $hook->setValue('dob',0); | |
| } | |
| return true; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment