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

Home » FUDforum Development » Bug Reports » users are unable to register with the forum, SQL error, fresh install
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: users are unable to register with the forum, SQL error, fresh install [message #9062 is a reply to message #9058] Tue, 11 March 2003 08:33 Go to previous messageGo to previous message
bbarnett is currently offline  bbarnett   Canada
Messages: 19
Registered: March 2003
Karma:
Junior Member


Well, I've discovered the issue.

Install FUD forum .8 release. Set up your forums so that none are readable by any registered user. Add a new user. This line:

$lmid=q_singleval("SELECT MAX(last_post_id) FROM fud23_forum WHERE ".($GLOBALS['usr']->is_mod != 'A' ? " id IN(".get_all_perms(_uid).") AND " : '')." cat_id!=0");

gives the error, because get_all_perms(_uid) returns nothing, if the user has no read ability on any forum.

Commenting out the line fixes things for now.

This is something that I'm sure a few people use. I have a closed board, with 10 different forums. Each forum is viewable by new, registered users.. but no forum is readable or postable until that user is added to a group.

Any ideas on a good fix? Quick fix was:

$lmid=q_singleval("SELECT MAX(last_post_id) FROM fud23_forum WHERE ".($GLOBALS['usr']->is_mod != 'A' ? " id IN(".get_all_perms(_uid).") AND " : '')." cat_id!=0");


Changed to :



$boogerface = get_all_perms(_uid);
if ($boogerface) {
$lmid=q_singleval("SELECT MAX(last_post_id) FROM fud23_forum WHERE ".($GLOBALS['usr']->is_mod != 'A' ? " id IN($boogerface) AND " : '')." cat_id!=0");
}
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: how to download newsgroups for first time
Next Topic: error on cat.inc
Goto Forum:
  

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

Current Time: Sun Oct 06 02:58:40 GMT 2024

Total time taken to generate the page: 0.05675 seconds