Skip to:
Content
Pages
Categories
Search
Top
Bottom

Specifying custom user DB table without altering WP settings


  • samurdhilbk
    Participant

    @samurdhilbk

    I am running two registration schemes in my website (which is still under local development). For one, I am using a different plugin which works with the default wp_users table. For the other, I am thinking of using a different table (say wp_members).
    How do I make BuddyPress work with this table (and an associated meta table) without disrupting the other plugin?

    If I’m not mistaken, doing

    define ( 'CUSTOM_USER_TABLE', 'wp_members' );
    	
    define ( 'CUSTOM_USER_META_TABLE', 'wp_members_meta' );

    would alter the WP settings as well.

    WordPress version – 4.7.2
    BuddyPress version – 2.7.4

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

  • danbp
    Moderator

    @danbp

    Hi,

    BuddyPress doesn’t handle users. It use WP’s user_table and user_meta and his own meta tables (bp_activity_meta or bp_notifications_meta).

    In BP settings, you have an option to sync BP to WP profile’s. And that’s all.

    If you have another plugin who’s is synced with WordPress profiles, guess it will do the same with BP. But, adding a custom member table only for BP usage within WP registration process isn’t a good idea as you probably will have to rewrite a lot of code.

    Members are the heart of BP, but in the sense of “how to show members and let them work together”, not in the way to include/register them to the site.
    BP doesn’t never affect the first step when accessing the WP user registering. This step belongs clearly to WP ONLY. Adding member and meta tables doesn’nt modify that.


    samurdhilbk
    Participant

    @samurdhilbk

    So in short, there is no simple way to isolate the registration process such that the “BuddyPress users” are added to different tables than the regular WP users right?


    danbp
    Moderator

    @danbp

    In brief, yes ! Because a BP member is already a regular wp user. As soon as you register to a wp site, you became a wp user, whatever the plugin(s) you use.
    Historically, WP is a CMS specialized in blogging… and is still this today… even if it can do much more as in 2003. But if we can today customize theme from within the wp-admin, we’re still confronted to a vintage user manager. Don’t know why, but outside subscriber, author and such (in fact, readers and newspaper actor’s terminology), there is not much you can do (simply) with “users” or “members”…

    Perhaps you need some documentation to understand. WordPress distinguish users by roles and access capabilities. There is no “member” consideration. Member is a frontend term who sounds better as subscriber or editor when associated with a plugin like BP0. The term sounds also more accurate when you promote a “crew”, a “team” or a “community”. But technically, there is only a user with a role in WordPress, not a member.

    https://codex.wordpress.org/Roles_and_Capabilities
    https://codex.wordpress.org/User_Levels

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar