This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes JForum and the fly likes Deleting a User Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "Deleting a User" Watch "Deleting a User" New topic
Author

Deleting a User

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
a quick question.

How can we delete a user in Jforum?


???
[originally posted on jforum.net by shanyangqu]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Actually, there isn't a way to delete a user. You can only lock them. This is because there is no good way to deal with posting the user already has.

For example, suppose the user has started several topics that have replies from other people. If you delete the posts with the user, you delete the main topic post and all the replies.. so deleting the user that way will delete other users work. Not the right thing to do.

The way most people deal with "deleted" users is to lock the user id and change the user name to something like: user_DELETED or similar. This frees up the user id to be re-used and keeps the postings intact.

There's probably a better way that this could be dealt with but that's what's in the code now..
[originally posted on jforum.net by monroe]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
thanks monroe, I guess Change User Name = Deleting A User!
[originally posted on jforum.net by shanyangqu]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
a quick question,

I wanted to know the working, when the admin clicks on the lock user tab. which java class and which method gets call to lock a particular user.

thanks
anil
[originally posted on jforum.net by anilhk]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
... it's quite some time ago that I last looked in the code (like more than a year ;))

But as far as I remember this should be some url like /user/edit ... so you have to look at the template mappings, which action class is being linked to this "url". This should be something with UserAction or so.

These methods take the request parameters and call the specific method internally to save the modified values to the db/cache

Monroe / Raphael may know more details on it
[originally posted on jforum.net by Sid]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
To hopefully clairify this a little...

Look at the URL in form action of the admin screen you need to see what's happening.

Then use the information here:

http://www.jforum.net/posts/list/4159.page#17143

To find the related class.


[originally posted on jforum.net by monroe]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Deleting a User