I have a custom content management system with a member area on the frontend and a login form to access some of the frontend pages. I also have WordPress and bbPress installed. I have setup WordPress and bbPress in one database and modified it so they use one common user table.
What I need is a script written that takes a username and password and will log the user into WordPress and bbPress at the same time that it logs the user into my CMS. I already have a script working to log the user into my CMS so all I need is a script that I can use to log the user into WordPress and bbPress at the same time. The script needs to be written to work independent of the WordPress / bbPress files so it can't call functions or classes used in those two scripts it just needs to do all the same steps that those 2 programs do when a user is logged in.