Topic: Log Users Automatically

Hi,

I've tried this post over at intergration forum and got no replies. I wonder if anyone can help.

How do I automatically log users into PunBB?

I have an existing site with a login (PHP, MySQL) and want users to use PunBB without having to enter a second username and password.

If such feature can be added with PunBB will be nice or if there anyone can help on this?

Thanks.

MENatWEBSITE.com
Web Development Service, New South Wales, Australia.

Re: Log Users Automatically

Moved to PunBB Discussion, since this is not a feature request but a request for information wink
So, the easiest way to do it:
Disable registration for PunBB
Edit profile.php so the user can't change certain details that you want to remain the same between accounts (eg: password)
When a user registers on your site, add a row to your PunBB users table for them.
When a user logs in, look up their information in the database and create a cookie like pun_setcookie does based on that information.

Re: Log Users Automatically

Smartys wrote:

When a user registers on your site, add a row to your PunBB users table for them.
When a user logs in, look up their information in the database and create a cookie like pun_setcookie does based on that information.

Could you please advise on the above how exactly I can do it?

Thanks a lot.

MENatWEBSITE.com
Web Development Service, New South Wales, Australia.

Re: Log Users Automatically

Registration: insert a row into the PunBB users table, look at what register.php does
Login: select the row from the user's table with the right username, check the password, and call pun_setcookie like login.php does.