XFileSharing Pro - How to delete a user without deleting his files?

Message
Author
awaisuk
Posts: 39
Joined: May 25, 2009 4:08 am

How to delete a user without deleting his files?

#1 Postby awaisuk » Dec 23, 2009 7:31 am

How to delete a user without deleting his files?

I want to delete a user only, but not his files, how can I do that?''

Thanks.

GMC
Posts: 172
Joined: Aug 15, 2009 4:48 am

#2 Postby GMC » Dec 23, 2009 9:24 am

Personally I would delete the username from the database

I havent done it - so unsure of the results - But I expect that may work

Keep a back up just in case

User avatar
PilgrimX182
Posts: 2186
Joined: Mar 22, 2006 1:39 pm

#3 Postby PilgrimX182 » Dec 23, 2009 12:56 pm

First need to reassing files to another user:

Code: Select all

UPDATE Files SET usr_id=NewUserID WHERE usr_id=CurrentUserId
then you can delete this user from Admin Users with no problems I think.

Hendrickson
Posts: 90
Joined: Nov 18, 2009 9:15 pm

#4 Postby Hendrickson » Dec 28, 2009 8:52 am

What about banned? Doesn't that block them. But still keep there files ?

Hendrickson
Posts: 90
Joined: Nov 18, 2009 9:15 pm

#5 Postby Hendrickson » Jan 11, 2010 6:43 pm

PilgrimX182 wrote:First need to reassing files to another user:

Code: Select all

UPDATE Files SET usr_id=NewUserID WHERE usr_id=CurrentUserId
then you can delete this user from Admin Users with no problems I think.
No doesn't work in myphp admin

ends in error #1054 - Unknown column 'testuser1' in 'where clause'

When running: UPDATE Files SET usr_id=testuser WHERE usr_id=testuser1

How do I get this to work?

admin
Site Admin
Posts: 1839
Joined: Mar 22, 2006 12:32 pm

#6 Postby admin » Jan 12, 2010 10:47 am

Hendrickson wrote:
When running: UPDATE Files SET usr_id=testuser WHERE usr_id=testuser1

How do I get this to work?

You should use user ID (number), but not name for usr_id field.