Deleting user accounts

General discussion of Mantis.

Moderators: Contributor, Developer

Post Reply
ajtruckle
Posts: 65
Joined: Oct 16, 2011 2:21 am

Deleting user accounts

Post by ajtruckle » Nov 03, 2018 2:35 am

There are accounts on my system that were created in 2011 and last used in 2011. How can I delete all accounts that were last used before 1 January 2016?

atrol
Site Admin
Posts: 7352
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Deleting user accounts

Post by atrol » Nov 04, 2018 4:38 am

As an example, check manage_user_prune.php to see how to delete users who have never logged in and are older than 1 week.

Keep in mind that
- there is no other undo after deleting users, than to restore a database backup
- wherever the deleted user is referenced (e.g. issues he created, notes he added), you will see the user name as a striked through User<ID>

So maybe you better just deactivate users instead of deleting them.
Please use Search before posting and read the Manual

ajtruckle
Posts: 65
Joined: Oct 16, 2011 2:21 am

Re: Deleting user accounts

Post by ajtruckle » Nov 04, 2018 4:43 am

Thanks. I don't see the point of having users in my database who have not used the resource in years.

But i don't want to fiddle with writing any PHP script or using phpadmin.

I would be much more comfortable with a user interface approach.

DorseyLey
Posts: 1
Joined: Oct 30, 2018 4:15 am

Re: Deleting user accounts

Post by DorseyLey » Nov 06, 2018 8:48 am

Hi Atrol, I was thinking along the same lines as the OP. But now that you mentioned deactivating users, I was wondering can you reactivate a deactivated user again?

atrol
Site Admin
Posts: 7352
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Deleting user accounts

Post by atrol » Nov 06, 2018 9:41 am

DorseyLey wrote:
Nov 06, 2018 8:48 am
can you reactivate a deactivated user again?
You can. Use Manage > Manage Users page for it. Enable check box "Show Disabled", click "Apply Filter" and order by column "Enabled"
Please use Search before posting and read the Manual

Post Reply