• Resolved marcomen

    (@marcomen)


    Hi, I am using plugin version 1.6 and noted that in some cases the “Date of birth check” functionality does not work.

    Looking at the code, I found that the check is made in function bpxs_check_dob (in bpxs-core.php), by comparing the concatenation of the strings representing month and day of today vs. those of the user inserted date.

    This (smart) check needs, however, a correction to take into account the one-digit days, eg., if today is 16 April and I am born the 9 May, the comparison ends up being 416 < 59 (wrong).

    So, I simply add this control:

    if (strlen($d) == 1) $d = “0$d”;

    in bpxs_check_dob function, before the calculation of $age. With this control added, the example above gives the comparison 416 < 509, that brings to the correct result.

    Hope this may help, and thank you for this useful plugin,
    Marco

    http://wordpress.org/extend/plugins/bp-xtra-signup/

  • The topic ‘[Plugin: BP Xtra Signup] Date of birth check failure’ is closed to new replies.