How to use FUDforum authentication from other scripts? [message #32539] |
Fri, 07 July 2006 21:54 |
Mreimer
Messages: 5 Registered: July 2006
Karma: 0
|
Junior Member |
|
|
Hello,
I have a huge database of users in a FUDforum based forum.
Now I want to allow all those users (if they aren't banned or something like that) to use a database application I've created. To be able to do this, I need the following:
- A way to read the FUDforum cookie. If a users logs in to FUDforum and stores a cookie, then my database application should read this cookie, too, to auto-login the user (I just need the login name of the user which has been logged in using the cookie information).
- A way to allow the user to login into the system, if not already done (user specifies username/password on my database application). This way should also set the cookie to login the user into both systems again.
The second thing should be possible with forum_login.php (external_get_user_by_auth followed by external_fud_login) but I don't know how I could do the first one.
Thank you very much in advance
|
|
|
Re: How to use FUDforum authentication from other scripts? [message #32550 is a reply to message #32539] |
Sat, 08 July 2006 17:46 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
FUDforum cookie stores the user's session id and that's all. To resolve this value to a user id you would need to query the forum's session database table and fetch the user_id field.
To login the user into other parts of the system when they login to the forum you need to modify the "login" code insiders users_reg.inc.t, the function user_login() ,
FUDforum Core Developer
|
|
|
|
|