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

Home » FUDforum » How To » Using FUDAPI to log in a user (Application integration: log in a user from another database)
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Using FUDAPI to log in a user [message #36321] Sat, 17 March 2007 03:51 Go to previous message
tog_benson is currently offline  tog_benson   United States
Messages: 10
Registered: March 2007
Karma:
Junior Member
Hello all,

I am integrating fud into an existing application with its own user management. My plan is to keep the fud user table and my app's user table synchronized (login name and email address info) All registering and logging in will be done through my application.

I have successfully employed fudapi.inc.php and forum_login.php to log a user into the forums from my system. When a user logs into my system, they're logged into the forums. One problem though, if I access "[fudforum]/index.php?t=index&S=[sess_id]" where sess is a valid session id, I get a blank page and this error in the logs:



ERROR: argument of OR must be type boolean, not type integer<br />
Query:

SELECT
m.subject, m.id, m.post_stamp,
u.id, u.alias,
f.cat_id, f.forum_icon, f.id, f.last_post_id, f.moderators, f.name, f.descr, f.post_count, f.thread_count,
fr.last_view, mo.id, COALESCE(g2.group_cache_opt, g1.group_cache_opt) AS group_cache_opt,
c.cat_opt &amp; 4
FROM fud26_fc_view v
INNER JOIN fud26_cat c ON c.id=v.c
INNER JOIN fud26_forum f ON f.id=v.f
INNER JOIN fud26_group_cache g1 ON g1.user_id=2147483647 AND g1.resource_id=f.id
LEFT JOIN fud26_msg m ON f.last_post_id=m.id
LEFT JOIN fud26_users u ON u.id=m.poster_id LEFT JOIN fud26_forum_read fr ON fr.forum_id=f.id AND fr.user_id=3 LEFT JOIN fud26_mod mo ON mo.user_id=3 AND mo.forum_id=f.id LEFT JOIN fud26_group_cache g2 ON g2.user_id=3 AND g2.resource_id=f.id WHERE (mo.id IS NOT NULL OR (COALESCE(g2.group_cache_opt, g1.group_cache_opt)) &amp; 1)&gt;0 ORDER BY v.id






I cannot tell what that is about. I believe I am using the api correctly. On login, I look up the user id by username and then call "external_fud_login($user_id);". When I access other pages like the search page, everything is rosy and I can see that I am logged in as the correct user. If I click home (with the same session id being passed) I get the error and blank page.



Also, I had to write a function to lookup the user id by user name. That's not in the api, correct?

Any ideas?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Problems with Internet Explorer 7
Next Topic: User permissions
Goto Forum:
  

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

Current Time: Sun Nov 10 00:15:30 GMT 2024

Total time taken to generate the page: 0.03927 seconds