Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Raven's RavenNuke(tm) v2.02.02 Distro
Author Message
dmtalon
New Member
New Member



Joined: May 10, 2006
Posts: 21

PostPosted: Fri May 12, 2006 10:52 pm Reply with quote

I just installed the latest version of RavenNuke and have gotten everything configured, however when I am trying to add users to a usergroup I only see 8 users. I have 198 in nuke_users table.

I haven't tested 100% of the site, but everything else seems to be working. The 'add user' table just lists 8 users and no way to show the rest.

I looked at two users (one that shows up, and one that doesn't) in phpmyadmin and didn't see any reason why the one wouldn't show up.

Any help would be greatly appreciated

Dallace
 
View user's profile Send private message
dmtalon







PostPosted: Sat May 13, 2006 1:28 pm Reply with quote

Riddle me this...

So, I decided to look at the code for this and found in admin/modules/nsngroups/NSNGroupsUsersAdd.php the way NSN Groups decides whether or not to show a user is based on two lines in the above file.

On line 19 in my file:

$totalselected = $db->sql_numrows($db->sql_query("SELECT * FROM `".$user_prefix."_users` WHERE `user_level`>'0'"));

And on line 27 in my file:

$result3 = $db->sql_query("SELECT `user_id`, `username` FROM `".$user_prefix."_users` WHERE `user_level`>'0' ORDER BY `username` LIMIT $min,".$grconfig['perpage']."");


Well 99% of my users have a user_level of "0". Now, I didn't find a lot about what the various user_level's mean. But I'm guessing 1=site atmin 2=moderator. 0=regular user and -1=anonymous.

I understand why you would want to NOT show / add Anonymous to a group, however I don't understand why you wouldn't want to add regular users. So I changed the two lines as follows adding the "=" after the ">"

$totalselected = $db->sql_numrows($db->sql_query("SELECT * FROM `".$user_prefix."_users` WHERE `user_level`>='0'"));

$result3 = $db->sql_query("SELECT `user_id`, `username` FROM `".$user_prefix."_users` WHERE `user_level`>='0' ORDER BY `username` LIMIT $min,".$grconfig['perpage']."");

And now all my users show up and I can add them to the groups!

Hope this change doesn't cause any secuity issues...
 
fkelly
Former Moderator in Good Standing



Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Sat May 13, 2006 6:45 pm Reply with quote

I just looked at the users table for my RN 2.02 system with over 900 users. The default value for user_level in the table is 1 and there's only a handful of admins that have higher than that. There are no records in my table with a user_level value set to zero.

You might want to look at the attributes for that field in your table and see why it doesn't correspond to what's in the "standard".

In fact, I just looked in rn76_core_pl32.sql file that comes in the installation directory RN 2.02 and the definition of this field in the users table is:

`user_level` int(10) NOT NULL default '1',

You might want to make sure that your table conforms to the distribution because if it doesn't all sorts of problems, as you are seeing, could crop up.
 
View user's profile Send private message Visit poster's website
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Raven's RavenNuke(tm) v2.02.02 Distro

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©