Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

How I can to delete user from forum?

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://myhost/adminUsers/list.page - can't find button delete. :-(
[originally posted on jforum.net by VVD]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is not currently supported!

If you delete users, what happens to all their messages? They would all be orphaned unless the UID of the posts gets set to some generic, non-deletable user.
[originally posted on jforum.net by GatorBait3]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A good system already used in others forums is to have 2 users (anonymous & killed) then assign posts to them before remove the user
[originally posted on jforum.net by redhand]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

redhand wrote:A good system already used in others forums is to have 2 users (anonymous & killed) then assign posts to them before remove the user


Exactly right redhand, this would work just fine.

I guess you would also have to dump their Privates Messages info too (sent, received, saved, etc.). to keep junk from accumulating in the DB.

A point to make here is that there is much more to deleting a user than just removing them from the jforum_users table!
[originally posted on jforum.net by GatorBait3]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
UPDATE jforum_posts SET user_id=$KILLED_ID WHERE user_id=?
UPDATE jforum_topics SET user_id=$KILLED_ID WHERE user_id=?
UPDATE jforum_attach SET user_id=$KILLED_ID WHERE user_id=?
UPDATE jforum_search_topics SET user_id=$KILLED_ID WHERE user_id=?
UPDATE jforum_vote_voters SET vote_user_id=$KILLED_ID WHERE vote_user_id=?
UPDATE jforum_privmsgs SET privmsgs_from_userid=$KILLED_ID WHERE privmsgs_from_userid=?

DELETE FROM jforum_user_groups WHERE user_id=?
DELETE FROM jforum_topics_watch WHERE user_id=?
DELETE FROM jforum_forums_watch WHERE user_id=?
DELETE FROM jforum_banlist WHERE user_id=?
DELETE FROM jforum_bookmarks WHERE user_id=?
DELETE FROM jforum_sessions WHERE session_user_id=?
DELETE FROM jforum_privmsgs WHERE privmsgs_to_userid=?

[originally posted on jforum.net by VVD]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

VVD wrote:UPDATE jforum_posts SET user_id=$KILLED_ID WHERE user_id=?
UPDATE jforum_topics SET user_id=$KILLED_ID WHERE user_id=?
UPDATE jforum_attach SET user_id=$KILLED_ID WHERE user_id=?
UPDATE jforum_search_topics SET user_id=$KILLED_ID WHERE user_id=?
UPDATE jforum_vote_voters SET vote_user_id=$KILLED_ID WHERE vote_user_id=?
UPDATE jforum_privmsgs SET privmsgs_from_userid=$KILLED_ID WHERE privmsgs_from_userid=?

DELETE FROM jforum_user_groups WHERE user_id=?
DELETE FROM jforum_topics_watch WHERE user_id=?
DELETE FROM jforum_forums_watch WHERE user_id=?
DELETE FROM jforum_banlist WHERE user_id=?
DELETE FROM jforum_bookmarks WHERE user_id=?
DELETE FROM jforum_sessions WHERE session_user_id=?
DELETE FROM jforum_privmsgs WHERE privmsgs_to_userid=?



Looks good! Now all you have to do is modify the JForum code to add the delete feature! ;)

[originally posted on jforum.net by GatorBait3]
 
reply
    Bookmark Topic Watch Topic
  • New Topic