Author |
Message |
dad7732
RavenNuke(tm) Development Team
Joined: Mar 18, 2007
Posts: 1242
|
Posted:
Mon Feb 14, 2011 8:44 am |
|
Deleting a user via the forums => Users => Management produces this error message:
Code:Could not delete group for this user
DEBUG MODE
SQL Error : 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2
DELETE FROM nuke_bbgroups WHERE group_id =
Line : 140
File : admin_users.php
|
Any ideas? The user IS removed but the error persists. |
|
|
|
|
dad7732
|
Posted:
Mon Feb 14, 2011 9:03 am |
|
Also getting this error when looking at Group Management:
Code:Could not obtain user info for moderator list
DEBUG MODE
SELECT user_id, username FROM nuke_users WHERE user_id = 2
Line : 121
File : admin_groups.php
|
Something is amiss for "groups" obviously, will have to ferret this out.
Update: Found the problem for this one, the ID-2 was missing so I assigned it to one of my other user-logins and now it works. |
Last edited by dad7732 on Mon Feb 14, 2011 9:40 am; edited 1 time in total |
|
|
|
nuken
RavenNuke(tm) Development Team
Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina
|
Posted:
Mon Feb 14, 2011 9:08 am |
|
I thought users were not supposed be deleted from the forums and only from Edit Users? |
_________________ Only registered users can see links on this board! Get registered or login! |
|
|
|
Susann
Moderator
Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support
|
Posted:
Mon Feb 14, 2011 9:22 am |
|
Yes, I believe this too and Palbin can tell us more about since he modified this. |
|
|
|
|
dad7732
|
Posted:
Mon Feb 14, 2011 9:34 am |
|
Re: Not supposed to delete from forums. The option is there at the bottom of the user information screen in the user managment section of "User admin".
The problem with taking that option is that it does remove the user but not the post(s). So in reality it's not a proper way to delete a user. This option should be removed from subsequent versions, IMHO. |
|
|
|
|
myrtletrees
Involved
Joined: Sep 13, 2005
Posts: 259
Location: Cornfields of Indiana
|
Posted:
Mon Apr 18, 2011 4:01 pm |
|
dad7732 wrote: | Re: Not supposed to delete from forums. The option is there at the bottom of the user information screen in the user managment section of "User admin".
The problem with taking that option is that it does remove the user but not the post(s). So in reality it's not a proper way to delete a user. This option should be removed from subsequent versions, IMHO. |
Rather than start another topic:
So what if you delete users from RNYA?
What I have noticed on our site is we have deleted users in the past, mostly test accounts and now those UID #'s are skipped.
For instance, in our Database, we have UID's from 0-109, yet these UID#'s are missing:
45,62,65,67,77,78,96,97,98,99,100,102,103,104
Is that normal with Raven Nuke? |
|
|
|
|
dad7732
|
Posted:
Mon Apr 18, 2011 4:07 pm |
|
Removing a user from RNYA does remove the user but not the posts they have made. Removing a user that has posts in the system changes the user to anonymous but the post(s) remain.
Regarding the UID's -- Once a UID has been assigned, it remains even though the user has been removed. UID's are not re-assigned AFAIK, don't think so. I have 15,000+ users on one site and new user UID's are incremented after the last user, not reused. |
|
|
|
|
myrtletrees
|
Posted:
Mon Apr 18, 2011 4:44 pm |
|
Thanks or the clarification. |
|
|
|
|
Guardian2003
Site Admin
Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Thu Apr 21, 2011 2:47 pm |
|
That is correct and is how mySQL handles data.
If a row of data is removed that has an auto-incrementing field, that row, with it's unique ID is never used again.
There are a couple of ways around this but none we can actually use. You can use the mySQL command TRUNCATE but that not only resets the counter but also wipes the entire table or you can modify the INSERT statement to look for the missing id and add a new row there and specify the specific ID you need to use - the problem with this is that it WILL impact other data that was relational to that ID, for example forum posts, comments etc. |
|
|
|
|
fkelly
Former Moderator in Good Standing
Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY
|
Posted:
Fri Apr 22, 2011 7:31 am |
|
Just to take Guardian's point a bit further -- the whole point of an auto-incrementing field and the subsequent unique ID is that the value in the field is supposed to be handled completely by the database software and should be non-meaningful and even irrelevant to the programmer or system user. Attempts by programmers to "manage" the keys in meaningful ways always wind up in disasters. Just let MYSQL do its thing and ignore the value of the key.
And stepping back a bit further in this thread, yes, it appears that Forums management does let you attempt to delete a user and then creates an error. These user management functions should be removed but there are open issues with how completely. This gets to be a complicated issue ... see:
Only registered users can see links on this board! Get registered or login!
which is being discussed separately in our issue tracking system. |
|
|
|
|
|