Logging in from another php application [message #28900] |
Wed, 16 November 2005 23:09 |
holdech
Messages: 9 Registered: November 2005
Karma: 0
|
Junior Member |
|
|
Hi all,
I need to link to FUD from another php application, where the user is already logged in and authenticated.
I assume that I just need to populate the appropriate globals?
I don't want to have user data in two databases...
Thanks
Chris
|
|
|
Re: Logging in from another php application [message #28903 is a reply to message #28900] |
Thu, 17 November 2005 14:15 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
Chris, look into the FUDAPI found inside the scripts/ directory the fudapi.inc.php and forum_login.php script have the functions you are looking for.
FUDforum Core Developer
|
|
|
|
|
Re: Logging in from another php application [message #28909 is a reply to message #28905] |
Thu, 17 November 2005 20:33 |
holdech
Messages: 9 Registered: November 2005
Karma: 0
|
Junior Member |
|
|
Thanks - tried it and the API is perfect.
Just one problem that I'll mention here (not related to remote signon).
When I post or edit a topic, I get a blank screen - but the topic was actually posted.
The blank page URL is http://mydomain.com/index.php?t=post
It appears to be missing parms?
Thanks
Chris
More inro - after sending the above, I read a post suggesting mail needed to be enabled. Now I get the following. Note that there are two sets of single quotes around the word "test" - which is causing the error. I'm running a postgresql DB:
(/home/lite/html/forum/index.php:96
/home/lite/html/forum/index.php:150
/home/lite/html/forum/theme/default/post.php:2769
/home/lite/html/forum/theme/default/post.php:1473
/home/lite/html/forum/theme/default/post.php:3878
/home/lite/html/forum/index.php:1219
) : ERROR: parser: parse error at or near "test" at character 42
Query: SELECT id FROM fud26_search WHERE word=''test''
_GET: array ( 't' => 'post', )
_POST: array ( 'btn_submit' => 1, 'msg_subject' => 'Test forum question', 'thr_ordertype' => '0', 'thr_orderexpiry' => '1000000000', 'msg_icon' => '', 'msg_body' => 'How do I set up other employees on the system? fff', 'tmp_f_val' => '1', 'msg_show_sig' => 'Y', 'minimsg_pager_switch' => '0', 'SQ' => '893e9e945189e31c3ad78515667f7a06', 'submitted' => '1', 'reply_to' => '0', 'th_id' => '1', 'frm_id' => '7', 'start' => '0', 'msg_id' => '1', 'pl_id' => '0', 'old_subject' => '', 'prev_loaded' => '1', )
Server Version:
[Referring Page] http://lite/forum/index.php?t=post
[Updated on: Thu, 17 November 2005 20:55] Report message to a moderator
|
|
|
|
Re: Logging in from another php application [message #28927 is a reply to message #28910] |
Fri, 18 November 2005 19:10 |
holdech
Messages: 9 Registered: November 2005
Karma: 0
|
Junior Member |
|
|
I really must comment on the excellent support I'm receiving.
It's refreshing to have someone realize that not everyone has time to dig through a complex application and figure it all out themselves.
You understand that support = acceptance and takeup rate.
I do need a bit more help though.
Maybe if I explain what I'm up to, that will help.
I'm using FUD as the company and user support forum for our web based business application. When employees are established for one of our clients, I'm setting them up in FUD. I am using your API now and it works great.
I did need to remove the restriction around email uniqueness (code and DB index/constraint).
Many employees use the same generic "company email"...
I also created the login name as a concattenation of clientID and userID (numeric sequence assigned values that are the primary index on their respective tables). This ensures userID will always be unique across our application.
So far, so good! I now want the user to access FUD via a link in our app i.e. the app handles the login - they never see an ID/password for FUD.
Problem, is that the /scripts/forum_login.php is designed for mySQL and has a "REPLACE INTO" command.
I'm using postgreSQL, so my question is - do you already have a postgres version or patch?
If not, I assume the best course is to delete any session records out there for the applicable FUD userID - then change the REPLACE INTO to an "INSERT INTO"?
Thanks again
Chris
[Updated on: Fri, 18 November 2005 19:12] Report message to a moderator
|
|
|
|
|