Skip to:
Content
Pages
Categories
Search
Top
Bottom

How do I find custom profile field database entries?

  • Avatar of libationblog
    libationblog
    Participant

    @libationblog

    How do I find custom profile field database entries?

    Using WPMU 2.7.1 and BP 1.0.2 I have setup a few required fields for user account creation. What I would like is to periodically pull this data from the database, the problem I am having is I can’t find it in the database. Does anybody know where this data resides?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    The custom field values are found in wp_bp_xprofile_fields table whereas the actual datum for each field is found in wp_bp_xprofile_data table.

    As far as how to output the data, this should give you some ideas: http://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-profile-data-loop-bp_has_profile/

    Avatar of libationblog
    libationblog
    Participant

    @libationblog

    Jeff you are a rockstar! Thanks again.

    Avatar of libationblog
    libationblog
    Participant

    @libationblog

    To follow up on this, the table you pointed out only has the default field “full name” not any of the custom fields I created. What am I missing?

    Avatar of catincoach
    Anonymous

    I just went through this so I am a voice of experience.

    Each additional profile field you add in the profile field setup is added to the xp_bp_xprofile_fields table. By default, there is only one field filled in on the wp_bp_xprofile_data table, which is the “full name.” Once you or someone else begins to add their additional information and hits save, the data table will expand and in a strange albeit normal way. The id of the user, say ’2′ will be listed repeatedly, as they have multiple pieces of information stored. The id of the table counts sequentially, so you’ll begin to see that number grow exponentially.

    Hope that helps.

    Brian

    Avatar of libationblog
    libationblog
    Participant

    @libationblog

    I see what you mean. I put the date field in the custom forms for birth date and instead of something simple like 12281977 (for dec, 28 1977) I get 252133200. What is the basis of decrypting this number?

    Avatar of catincoach
    Anonymous

    that’s computer language for a date in history. can’t explain it but it is present in microsoft excel among other places

    Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    The time is stored in UNIX time, which is the number of seconds that have elapsed since January 1, 1970 UTC.

    So, you basically have 8 years minus three days. Which is ((8 years-3 days) * 365.25 days in a year * 86,400 seconds in a day) = 252,201,600

    Now, this is slightly off since I have no idea what time you actually posted that date data. But, it’s close enough to show you how it’s done.

    Avatar of wellrootedmedia
    wellrootedmedia
    Participant

    @wellrootedmedia

    Hey 4yrs and 8 months later I’m finding myself looking for this solution although this link is 404′ing “http://codex.buddypress.org/developer-docs/custom-buddypress-loops/the-profile-data-loop-bp_has_profile/”. Is this still something supported?

    Thx, wrm

Viewing 8 replies - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.