FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Help with fudapi and forum_login ...
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Help with fudapi and forum_login ... [message #29576] Sun, 01 January 2006 12:44 Go to next message
mpwalsh8 is currently offline  mpwalsh8   United States
Messages: 2
Registered: January 2006
Location: Cary, North Carolina
Karma: 0
Junior Member

I am in the process of integrating FUDforum to an existing application which has its own user database. I have two scenarios to manage:
  • New Users
  • Existing Users

New users are easy - during the registration process they are added to the FUDforum database using fudapi. When an existing user logs in, the process checks to see if the user has already been added to the FUDforum database using fudapi, if not, the user is added.

Once a user is logged in to my application, I also want to log the user into FUDforum using external_fud_login(). This seems to work and I get what appears to be a valid FUD session id. However, when I go to the actual forum (via a link on a menu), FUDforum does not recognize the user as logged in. Should the URL be constructed in a specific manner? I thought adding "?S=xxxxxxxxxx" with the value of the session id would work but it didn't seem to have any affect.

I have read through the API and external login code a number of times and searched the forum but can't find any references to what I may be doing wrong.

Once the user is logged in via my normal login process, I want the forum to work just it would if the user had logged into the forum as a standalone application. Is this possible?

Thanks,

Mike
Re: Help with fudapi and forum_login ... [message #29578 is a reply to message #29576] Sun, 01 January 2006 19:23 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
The login API sets a cookie for the user and returns you a session id that you can pass to the forum URLs via S=[session_id].

FUDforum Core Developer
Re: Help with fudapi and forum_login ... [message #29588 is a reply to message #29578] Mon, 02 January 2006 04:40 Go to previous messageGo to next message
mpwalsh8 is currently offline  mpwalsh8   United States
Messages: 2
Registered: January 2006
Location: Cary, North Carolina
Karma: 0
Junior Member

Ilia wrote on Sun, 01 January 2006 14:23

The login API sets a cookie for the user and returns you a session id that you can pass to the forum URLs via S=[session_id].


It has taken me several hours this evening to track this down but I now have it working. It turns out the FUDforum cookie wasn't being set by external_fud_login(). Why wasn't it being set? I am not really sure but the reference to GLOBALS.php in the /scripts directory doesn't seem to work (under IIS with PHP 4.4.1). I had to modify forum_login.php as follows:

/* --------- CONFIG OPTIONS START (required) ----------- */
//$GLOBALS['PATH_TO_FUD_FORUM_GLOBALS_PHP'] = './GLOBALS.php';
$GLOBALS['PATH_TO_FUD_FORUM_GLOBALS_PHP'] = dirname(__FILE__) . '/../include/GLOBALS.php';


Now it is working as expected. Next on my list is tweaking the UI such that FUDforum resides inside the UI of the rest of my site. One think I need to ensure is that the FUDforum "Logout" option isn't presented to the user, that could really confuse things!

Mike
Re: Help with fudapi and forum_login ... [message #29594 is a reply to message #29588] Mon, 02 January 2006 16:39 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
You can remove the logout link by editing the usercp.tmpl template.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: change the top navigation link
Next Topic: nntp error
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Feb 16 15:14:04 GMT 2025

Total time taken to generate the page: 0.06098 seconds