Is it possible to permanently delete a user? Will questions/answers that the deleted user created or edited remain and be accessible to others? Or (as I suspect), it is not recommended to delete a user - merely inactivate (and all of the material the user created will remain...)

asked 18 May '10, 12:42

expaand's gravatar image

expaand
731111620
accept rate: 33%

See feature-request ticket: http://jira.osqa.net/browse/OSQA-301

(20 Jan '11, 14:00) mattdm

You can delete a user which has no post and no activity of anykind by using the following SQL statements.

Replace test1 with the username you would like to delete.

SET @userId = (SELECT id FROM auth_user WHERE username = 'test1');
DELETE FROM forum_actionrepute WHERE user_id = @userId;
DELETE FROM forum_action WHERE user_id = @userId;
DELETE FROM forum_validationhash WHERE user_id = @userId;
DELETE FROM forum_subscriptionsettings WHERE user_id = @userId;
DELETE FROM forum_userproperty WHERE user_id = @userId;
DELETE FROM forum_user WHERE user_ptr_id = @userId;
DELETE FROM auth_user WHERE id = @userId;
link

answered 12 Sep '11, 15:32

kerem's gravatar image

kerem
91137
accept rate: 0%

nice one, just kick out :)

(24 Sep '11, 04:49) klimmass

That's a really interesting question, expaand, and I'm not sure I can answer it correctly. How should OSQA be handling the case where an admin (or the user himself) want to permanent delete an account?

I don't favor allowing people to destroy content which is already present in the community. Even if they close their account, we aren't going to eradicate everything they ever contributed. Certainly an admin should have the power to do so, but once that content is in the community , the user should no longer have the right to tear it out. This could be really disruptive.

link

answered 18 May '10, 14:55

rickross's gravatar image

rickross ♦♦
12.5k2914972
accept rate: 46%

Well, I did notice that if you actually delete the user (from the db tables auth_user, forum_user, etc), the questions remain, but if you click on one, you get an error. Perhaps have a feature so that if you want to delete a user, you can, but all of the user's previous edits get put under a special user (like "anon"). Then everything would still work, but you could at least remove the user info from the db.

(18 May '10, 15:01) expaand

It's probably not optimal to go direct to the database to manage things. There is code that gets triggered by actions, and things could go poorly if it doesn't get executed. When you delete records in the database, that code will never get a chance to run.

(18 May '10, 15:14) rickross ♦♦

Believe me, I know! What I wish this system had (and many other systems I use!) was a set of higher level api functions - so that I could do things at a high level, like list,add or delete users, get the last N questions, responses, perhaps delete a question, etc. This is important for any high-level automation (whether direct in standalone programs or via, say, a REST implementation).

(18 May '10, 15:52) expaand

I have no idea when we will finally get to it, but we definitely expect to produce and maintain a service-level api for OSQA. I wouldn't hold my breath until it arrives, though!

(18 May '10, 16:25) rickross ♦♦

So in the meantime, I am trying to put together my own. I need to create users (but can leave deleting them, for now).

(18 May '10, 17:05) expaand
3

I feel that its important to have the feature. SF Answers gets pokers bots/spammers from time-to-time, and all I have to do is "destroy" the user; it deletes the user along with the content for that user

(18 May '10, 17:24) debug

Rick, I think debug makes an interesting point that we SHOULD be able to completely nuke a user and their content if they are a spammer. Maybe the operation should be called "nuke", to suggest its destructive implications?

(19 May '10, 12:58) Joseph

Destruction of all user activity (controlled by the admin) is essential for dealing with spammers, IMHO.

(19 May '10, 21:40) ECO
1

Which part of "Certainly an admin should have the power to do so" was unclear? It's as if you guys think there's some disagreement.

(19 May '10, 21:48) rickross ♦♦

@debug how do you "destroy" a user? I'm also having trouble with the poker bots? Should i just delete it from the DB?

(02 Nov '10, 23:03) kirbuchi

As spam becomes a greater issues with the OSQA project you're going to be forced have a delete command, or else every OSQA website will be destroyed. I understand your point of view RickRoss, but what if the content that user created was destructive or obscene!?

(20 Jan '11, 17:44) Noah_Q
showing 5 of 11 show 6 more comments

Yes it should be possible for to delete the user permanently in the meaning white time of the earth.

link

answered 18 May '10, 22:53

vinayteotia's gravatar image

vinayteotia
161
accept rate: 0%

I have no idea what this means, but I like it. I've filed a new JIRA ticket for OSQA to support meaning white time of the earth.

(19 May '10, 12:57) Joseph

"White time of the earth" must mean winter, silly! Aren't you in Canada?

(19 May '10, 12:59) rickross ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×18

Asked: 18 May '10, 12:42

Seen: 1,042 times

Last updated: 24 Sep '11, 04:49

powered by OSQA