Using FUDAPI to log in a user [message #36321] |
Sat, 17 March 2007 03:51 |
tog_benson
Messages: 10 Registered: March 2007
Karma: 0
|
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 & 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)) & 1)>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?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|