BuddyDev

Search

Replies

  • Participant
    Level: Initiated
    Posts: 2
    medievil on #21614

    Hi Brajesh,

    I have found the cause of the issue.

    When creating the dropdown profile field, I set the default option to “Yes”.
    When checking the user’s profile, this shows correctly as “Yes” for this option.

    However after a closer look, the field data is not actually set to this unless I or the user manually update the profile and therefore write the data to the field.
    It seems that because the default option is used, the data only “appears” to be set, where actually it is blank.
    This is what confused me.

    The workaround is to either
    1) Mass-update all user profiles for this field, or
    2) Change the PHP function parameters to check for anything except the default option (“No”, this is what I did).

    As option 1 would cause problems for any newly created profile, I had no choice but to go with option 2.
    Is this something that could be fixed in a future update? You can recreate this issue by creating a profile field with a default option, then exporting user’s data to a CSV. The profile field will be blank.

  • Participant
    Level: Initiated
    Posts: 2
    medievil on #21544

    Hi Ravi,

    Thanks for reaching out.
    The field type is a Dropdown Select with two options (Yes & No).

    A var_dump of $bpmember returns the correct integer for that particular member.
    A var_dump of $phonecheck returns a blank string.

    I have an identical function ($emailcheck) that grabs field data from an identical Dropdown Select field and this is returning “Yes” as normal.

    I am at a complete loss as to why this is occurring. I have checked the syntax 10 times and it is identical to a working function.
    It only appears to be happening to newly created xprofile fields, I cannot fetch data from any of them. However I can grab data from the older fields with no problems.