Skip to:


  • Hello,

    I have modified our website’s registeration process so it copies over the user information to “bb_users” and the correct permissions for “bb_usermeta” — all working as expected, allowing us one registeration process for the site, AND forum. Excellent.

    What I want to do now, is set the cookie information during our website login, so it automatically logs them in to the forum (as both username and password are always the same, as we handle this during registeration).

    Problem is, I can’t figure out what bbpress is using to make the md5hash of the cookie name, example: bb_user_f1f348ebf7e6886fc1e743a675246401

    If I modify bbpress to force the name (NOT THE VALUE) of the cookie to be, example: “usercookie” and “passwordcookie” — then my login process works and the user can move around the site and message board seemlessly, but this isn’t working as intended.

    So simply, can someone tell me how the cookie name is created so I can do the same in my own login process! Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Not sure which file actually ‘writes’ the cookie, but as you know you can play around quite a bit by changing things in config.php. For example:

    For default installs this effectively makes the cookie names:
    'bb_user_' . md5('bb_')
    'bb_pass_' . md5('bb_')

    You can override the name of the cookie by setting values for the following somewhere in config.php:
    $bb->usercookie = 'my_great_user_cookie_name'
    $bb->passcookie = 'my_great_pass_cookie_name'

    Other than that, another user might have to tell you what function creates the cookie and then check the code. function.php maybe?


    Thank you Trent,

    This worked perfectly!

    Took me a while though to figure out why setting the cookie with the same password hashed as the one in the database wasn’t working, reason being, bbpress stores your password into the database as md5(yourpassword), fine — obvious! :)

    BUT … it stores your password in your session cookie as, md5(md5(yourpassword)) — So, there you go :)

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