Skip to:
Content
Pages
Categories
Search
Top
Bottom

Add fields to wp_users

  • Avatar of Peterverkooijen
    peterverkooijen
    Participant

    @peterverkooijen

    If I add fields to the wp_users table in the database, how can I add those fields to the registration form?

    I know Buddypress has a way to add profile fields, but they get stored in weird places. I want one table with all the basic members data -> full name, company, city, URL, etc.

Viewing 7 replies - 1 through 7 (of 7 total)
  • This is just not the way that WordPress MU works. Buddypress is a plugin for WordPress MU and therefore uses the standard functions that WPMU provides to store and retrieve custom database information.

    Avatar of Peterverkooijen
    peterverkooijen
    Participant

    @peterverkooijen

    I know that’s not default WordPress MU+Buddypress. That’s why I ask, in the ‘Creating & Extending’ section. I understand it would require hacking.

    It’s not impossible to add fields to the wp_users table. My question then is, where can I add corresponding fields to the form and where is the query that puts the data in the fields.

    That’s should be hackable somehow. Don’t tell me there are Natural Laws against it.

    If there’s really no way to achieve this kind of thing, I can’t use WPMU/Buddypress and should get out now while I still can.

    Avatar of Andy Peatling
    Andy Peatling
    Keymaster

    @apeatling

    That is exactly what usermeta is for. You should take a look at the WordPress codex for this sort of thing, it will help you a great deal.

    Avatar of Peterverkooijen
    peterverkooijen
    Participant

    @peterverkooijen

    That is exactly what usermeta is for.

    usermeta contains a lot of very cryptic data about bb_capabilities and blog roles/functionality, most from test members I’ve already deleted from the system. What am I supposed to do with that?!

    The WordPress Codex has lots of useful information, but very little about the database structure, how to form queries to pull up that data and where these queries are in the WordPress code.

    There is a section on the database structure, but it\’s about version 2.5. I know some fundamental changes were made since that version. It’s not relevant for WPMU and Buddypress anyway.

    Basically I’m trying to figure out how to keep a full-fledged members database at the heart of WordPress, with common fields like name, address, company, title, etc., that I can tap into for other scripts. Static data that doesn’t interfere with other functionality in WP.

    Has nobody ever done that? Is it impossible?

    Should I create a seperate members database outside WordPress that somehow communicates/syncs with WordPress?

    Avatar of Jeff Sayre
    Jeff Sayre
    Participant

    @jeffsayre

    Peter-

    I realize that you are not getting the answers you desire. You must have a sufficient understanding of and comfort level with PHP before you can delve too deeply into hacking your own solutions or coding your own theme templates. Otherwise, you need to use the stock WPMU and BuddyPress install and then customize with any plugins and 3rd-party themes that may be useful.

    Since we do not have any idea of your particular coding skills, we are trying to point you in the right direction. Please realize that beyond a certain point, we cannot help you write your own custom code.

    We all started at the beginning when it came to coding and then had another learning curve when it came to understanding the inner workings of WordPress and BuddyPress. It can be frustrating along the way but it is indeed possible to accomplish!

    Here are a few more tips:

    1. Since you do seem to be wanting to group all user data within stock WP tables, you should search the WP and WPMU forums and ask your questions there
    2. Visit these WP Codex pages to help shed more light:
    3. Google for tips on learning data-driven PHP coding
    4. Hire a 3rd-party developer who can do the work: hacking files directly or create a plugin that will accomplish what you’re after

    Please hang in there and don’t give up hope.

    Avatar of Peterverkooijen
    peterverkooijen
    Participant

    @peterverkooijen

    Thanks Jeff. Those function reference pages look very useful. I’ll dive back into PHP hell next Saturday…

    I’ve been struggling with this crap, including html/css, javascript, etc., since about 2002. I usually want what I think are basic requirements, like in this case a pretty straightforward members table. So far I’ve had most luck stitching together simpler PHP scripts that I could sort of follow.

    The more mature packages, like WordPress, are great for teens/tweens that want to add widgets and play around with templates, but they drop the ball on some basic grown-up business requirements and are much harder to customize unless you\’re a hardcore programmer.

    I can’t afford to spend the time to become a programmer. I’d hire a 3rd party developer if I could get a clearer picture of what I need and what’s possible in WP. I did do Google searches and have posted lots of related questions on the WP and WPMU forums.

    BTW, an intern from NYU Polytechnic was supposed to work on my project. He was a real PHP programmer, but had never heard of WordPress and seemed to know even less than I did.

    Avatar of Greg
    Greg
    Participant

    @rebootnow

    I have related questions about the relationship between the WP tables and the BP tables, so I’d like to make sure that I understand the responses above.

    I know that BP maintains user profile information separately from “wp_usermeta” (in “wp_bp_xprofile_data”, to be specific). BP provides functionality for modifying this information, but no way for putting “wp_usermeta” fields into the “edit profile” form.

    So I think the answer to Peter’s question is that without *major* customization:

    1. You have to be happy with user data being stored in a few different places

    2. All user editable info must be in the tables created by BP

    Is this correct?

    BTW, what does the “Disable BuddyPress to WordPress profile syncing?” option do under BP General Settings in the admin page? Does this only apply to the username field?

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

You must be logged in to reply to this topic.