Page 1 of 1

Deleting user accounts

Posted: 03 Nov 2018, 07:35
by ajtruckle
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?

Re: Deleting user accounts

Posted: 04 Nov 2018, 09:38
by atrol
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.

Re: Deleting user accounts

Posted: 04 Nov 2018, 09:43
by ajtruckle
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.

Re: Deleting user accounts

Posted: 06 Nov 2018, 13:48
by DorseyLey
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?

Re: Deleting user accounts

Posted: 06 Nov 2018, 14:41
by atrol
DorseyLey wrote: 06 Nov 2018, 13:48can 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"

Re: Deleting user accounts

Posted: 13 Feb 2019, 07:31
by Raindrop
I don't think deleting them would be the best idea. Maybe putting them in a dormant mode would be the best option because you can reactivate whenever you want.

Re: Deleting user accounts

Posted: 09 Oct 2019, 00:24
by amphetamine
atrol wrote: 04 Nov 2018, 09:38 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.
the mistake I was made by accident :x
Is possible to re-add the deleted user through phpmyadmin? (same id, user name, email, etc.,)
I've tried, but get the #1062 error and don't know how to fixed it.

Re: Deleting user accounts

Posted: 10 Oct 2019, 11:18
by cas
error 1062 stands for duplicate row (dupilicate primary key) , seems you try to add a user which is already there :mrgreen: