• 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
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Possibility to delete users

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If delete user by commands:
DELETE FROM jforum_user_groups WHERE user_id = UID
DELETE FROM jforum_users WHERE user_id = UID

Then open forum - we have error:
20:58:27,575 ERROR [runtime ]
Expression topic.lastPostBy.username is undefined on line 208, column 144 in default/forum_show.htm.
The problematic instruction:
----------
==> ${topic.lastPostBy.username} [on line 208, column 142 in default/forum_show.htm]
----------

Now I understend why I can't delete user from user administration page.
May be better to allow user removing, and check user exist, and on forum write <USER DELETED>.

[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
Thanks why deleting users isn't supported .. it orphans all of their posts!

A way to implement this would be to just replace all the posts UIDs with a generic anonymous user (which can never be deleted).

But direct deletes on the database via DB command line can be very dangerous and usually will break something.
[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
https://coderanch.com/t/576364 #11372
[originally posted on jforum.net by VVD]
 
Do the next thing next. That’s a pretty good rule. Read the tiny ad, that’s a pretty good rule, too.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic