Hi David,

I'm on vacation with very sporadic Internet access right now, so I
can't really give you much right now, but I'd say two things.

First, you may want to keep these users in the database and mark them
inactive, so they can't be re-registered.

Second, it would be easier/safer to so this through a Python shell. As
a simple example:

    $ rb-site manage /path/to/site
    >>> from django.contrib.auth.models import User
    >>> users = User.objects.filter(username__in=["username1",
"username2", .....])
    >>> # to mark them inactive...
    >>> for u in users:
    >>>    u.active = False
    >>>    u.save()
    >>> # to delete instead...
    >>> users.delete()

You could extend this to read in the list and then perform the action.

Christian

On Monday, November 9, 2009, David Solbach <d...@vidsolbach.de> wrote:
>
> Hi,
>
> KDE's reviewboard had some problems with accounts registered by spammers or
> some kid who doesn't know how much fun it is to write open source software
> instead of silly web-scripts :)
>
> Now I thought about cleaning the users with an sql statement. I'm a little
> afraid to destroy integrity, if I do it myself (since I don't know what links
> there are to the user and the user's profile).
>
> Could maybe someone with proper knowledge of the db schema provide me with an
> SQL statements that deletes all users who have nothing else but a profile
> linked to them?
>
> That way I don't have to go through all the fake users manually.
>
> Any help greatly appreciated,
>
> David
>
> > To unsubscribe from this group, send email to 
> > reviewboard+unsubscr...@googlegroups.com
> For more options, visit this group at 
> http://groups.google.com/group/reviewboard?hl=en
> -~----------~----~----~----~------~----~------~--~---
>
>

-- 
-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.reviewboard.org
VMware, Inc. - http://www.vmware.com

--~--~---------~--~----~------------~-------~--~----~
Want to help the Review Board project? Donate today at 
http://www.reviewboard.org/donate/
Happy user? Let us know at http://www.reviewboard.org/users/
-~----------~----~----~----~------~----~------~--~---
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to