Skip to:

Integrate with custom user backend

  • I’ve created a custom user system for a website and am looking for a forum solution; a friend recommended bbPress to me. However, I need to be able to integrate bbPress so I have a single sign-on and registration point.

    Searching around, I’ve found that I’ll need to write a plugin that overrides some of the functions in bb-includes/pluggable.php. All right, sure. This is my first time working with bbPress (no WordPress experience either), so I might as well ask those with more experience in case there’s any advice that could make this easier for me.

    I manage authentication through a single cookie with a login_key. This is a randomly-generated string of characters that gets stored in the user’s row in the users table. Each time the user signs in, the site generates a new key and stores that in the table and the cookie.

    The users table itself contains fields similar to those of bb_users: id, username, email, first_name, last_name, etc. So integration seems to be a matter of getting bbPress to check for my login_key cookie, and if the cookie is valid, load the data from my users table instead of from bb_users. I’m not concerned about registration, profiles or password changes, since those are all handled by the site on a larger level (although if I could disable those parts of bbPress, that would be helpful).

    Looking at pluggable.php, I’ll need to override wp_validate_auth_cookie() and bb_current_user() at the very least. Any other guidance?

Viewing 4 replies - 1 through 4 (of 4 total)
  • I have the same issue plus i need bbpress to be wrapped within the central column of my site, which is generated by a php function….did you manage to do that?

    Nah, I was just going to alter the theme to match my website’s eventual design. Having bbPress handle everything except whether or not the user is logged in is fine by my (although I was also hoping to make it display the user’s avatar, display name, and whatnot).

    At this point though, because I don’t have much experience with extending WordPress, I’m just looking into writing my own custom system rather than play around with bbPress. While I could probably come up with a solution with some more effort, I can probably produce a workable forum that integrates fully into my system in about the same amount of time.


    I have the same issue.

    Basically I have in my site a table “users” with with 4 fields (id, login, password, connexion)

    Whenever a user logs in, I generate a random string and put it in the user’s connexion field and create a ‘login’ cookie.

    What I want is that if a ‘login’ cookie is detected, bbpress reads the cookie’s value and matches it against the users table and then creates the user instance.

    Also in the topic list I want bbpress to display users from my users table.

    Can anyone guide me how to achieve this? Is it even possible?

    I will pay anyone that can create me a plugin for this.

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