phpbb3 cookies

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

phpbb3 cookies

Post by Burrito »

I'm sure I could figure this out by digging through the code behind phpbb3 but thought I'd just check here first to find out if anyone has done something similar and save me the time.

Basically I'm trying to create a 'portal' for my web site that has a phpbb3 forum incorporated. I'd like for users to register in one spot and have that log-in work for all aspects of the site. Similarly, I'd like for the cookie that is sent upon 'remember me' to automatically log them in to all aspects of the site.

I did this exact thing a looooooong time ago with phpbb2 but alas, they've changed things with phpbb3.

I see 4 cookies as being set by phpBB3 one of which is the user id, the other ones have hashed values which I can't determine just by a cursory glance.

anyone know what kind of logic they're using for the auto-login?

tia,

Burr
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: phpbb3 cookies

Post by pickle »

I can't imagine they'd rely completely on the cookie data to authenticate a user - I'd imagine the other 3 are hashes of some data they keep in the database. If I had to guess I'd say they md5() some stuff - but what they hash is anyone's guess.

Doing a quick Google search, the file /forum/phpBB3_forum.php kept being mentioned, so maybe there's something important in there.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply