Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Use existing login for PHPBB

Options
  • 28-03-2007 8:11pm
    #1
    Closed Accounts Posts: 18,163 ✭✭✭✭


    Hi guys

    I have a site that already has a member login, and they want to add a forum using PHPBB

    I have 2 options:
    1) Import the member names & passwords when importing the member list
    2) Use the site's existing login to set whatever session cookies that PHPBB needs

    Either way I know I'll need to tap into PHPBB's encryption, but which is the better way to do it and has anyone done it before who could point me in the direction of a few tips and the line of least resistance ?


Comments

  • Registered Users Posts: 68,317 ✭✭✭✭seamus


    It's quite easy, I would recommend importing your existing user list into the PHPBB table. If you need any custom columns, that shouldn't be a problem. Just use an identifying letter at the start of the column name to avoid collisions with phpbb columns.

    PHPBB provides a login form and a session cookie that contains all of the user's details.

    I don't have any code to hand, but you can basically include PHPBB's session functions in your own code to validate vistors. You can also directly call the login form (it has a callback function). That is, if your forum is at www.mydomain.com/forum/, and you want someone to be able to login from www.mydomain.com/index.php and then be returned there, you can simply put a form on index.php which POSTS to forum/login.php and tells it to direct the user back to index.php when logged in.

    Have a tinker about with it, it's quite simple really.


Advertisement