How to delete Redmine users

Redmine logoI’ve recently transfered all my project planning, development, bug ticketing and repositories to the awesome Redmine project tracking software. From now on all of my development work will live on tracking.42dev.eu

 

To facilitate bug reports and feature planning for my latest WordPress Plugin I’ve activated user registrations in Redmine, so people can post messages on the Forums. Now I wanted to have some sort of mechanism to delete unwanted users from the Redmine database. Since the software has no such option on the webinterface I searched for an alternative and found one on the Redmine forums.

Go to you Redmine install directory and enter the following (substitute USER_ID with the desired value):

>> script/console
>> u = User.find(USER_ID)
>> u.destroy

Make sure, that the user you are deleting doesn’t have any activity on the site yet, otherwise problems could arise, if the user already posted messages etc.

2 comments

  1. You can replace the find method for find_by_login, thus no need to search the USER_ID in the database. Would look like:

    >> script/console
    >> u = User.find_by_login(USER_LOGIN)
    >> u.destroy

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.