RT 4.4.6 Documentation
RT::Shredder::Plugin::Users
NAME
RT::Shredder::Plugin::Users - search plugin for wiping users.
SYNOPSIS
This shredder plugin removes user records from the RT system. Since users can be connected to many other objects in RT, these connections must be resolved in some way before removing a user record. RT will not automatically shred linked objects (i.e., tickets, transactions, attachments, etc.) when attempting to shred a user.
RT provides the following options for handling linked objects.
Replace User
This option locates all records currently referenced by the user you wish to shred and replaces the reference with a reference to the user record you provide. This can be another real user or a placeholder user. Once these references are updated, the original user can be shredded.
You can use this option with the replace_relations argument.
Delete Objects First
If you wish to completely remove all records associated with a user, you can perform searches and remove objects using other shredder plugins first. For example, if the user is a requestor on one or more tickets, first use the Tickets shredder plugin and search for "Requestor.EmailAddress = 'user1@example.com'". Once all associated objects are removed, you may then use the users plugin to shred the user record.
If you receive an error when trying to shred a user, it's possible it is still reference by other objects in RT.
ARGUMENTS
status - string
Status argument allow you to limit result set to disabled
, enabled
or any
users. Default value is disabled
.
name - mask
User name mask.
email - mask
Email address mask.
member_of - group identifier
Using this option users that are members of a particular group can be selected for deletion. Identifier is name of user defined group or id of a group, as well Privileged
or <unprivileged> can used to select people from system groups.
not_member_of - group identifier
Like member_of, but selects users who are not members of the provided group.
replace_relations - user identifier
When you delete a user there could be minor links to them in the RT database. This option allow you to replace these links with links to the new user. The replaceable links are Creator and LastUpdatedBy, but NOT any watcher roles. This means that if the user is a watcher(Requestor, Owner, Cc or AdminCc) of the ticket or queue then the link would be deleted.
This argument could be a user id or name.
no_tickets - boolean
If true then plugin looks for users who are not watchers (Owners, Requestors, Ccs or AdminCcs) of any ticket.
Before RT 3.8.5, users who were watchers of deleted tickets will be deleted when this option was enabled. Decision has been made that it's not correct and you should either shred these deleted tickets, change watchers or explicitly delete user by name or email.
Note that found users still may have relations with other objects, for example via Creator or LastUpdatedBy fields, and you most probably want to use replace_relations
option.
no_ticket_transactions - boolean
If true then plugin looks for users who have created no ticket transactions. This is especially useful after wiping out tickets.
Note that found users still may have relations with other objects, for example via Creator or LastUpdatedBy fields, and you most probably want to use replace_relations
option.