AnonymizeUser Command

The AnonymizeUser command will anonymize user data for a specific username. This command is available for server addons.

The AnonymizeUser command is available in Aeon v4.0 and higher.

AnonymizeUser Parameters

Usernamein stringThe username that should be anonymized.
FieldsToAnonymizein (optional) stringA comma-separated list of fields from the User table that should be anonymized.

Anonymized Data

The AnonymizeUser command will anonymize data in the Users table and all related tables where the user may have been linked.

Updated Fields

Regardless of any overridden fields, the following will always be modified.

  • Username: The anonymized username will be a unique identifier with a prefix of "Anonymous_". E.g. Anonymous_874bf821-1cb9-426d-853e-4b5e8878dd10
  • Password: The password is set to null to prevent login to the web interface. 
  • UserImage: All images associated with a user are purged. The UserImage column is set to null.
  • Cleared: The cleared value will be Anonymous for all anonymized users.

Default User Fields that are cleared

  • FirstName 
  • LastName
  • Address
  • Address2
  • City
  • State
  • Zip
  • Country
  • SAddress
  • SAddress2
  • SCity
  • SState
  • SZip
  • SCountry
  • EMailAddress
  • Phone
  • Fax
  • ID
  • IDType
  • AltID
  • AltIDType
  • DateOfBirth
  • Organization
  • PasswordHint

Related tables

Records are deleted from the following for the specific user being anonymized:

  • ActivityHistory
  • Alerts 
  • BillingGatewayTransactions
  • BillingGatewayTransactionLinks
  • EmailCopies
  • ProxyLink
  • ResearcherTags
  • UserAccountLinks
  • UserAttachments (& related FileInformation and Files)
  • UserChangeHistory
  • UserHistory
  • UserImages
  • UserNotes
  • UserValidation
  • WebSession

Some tables are updated to store the new anonymized username to maintain links instead of deleting when a user is anonymized. 

  • Transactions
  • Tracking


The following are examples of the syntax used in a SystemManager addon to anonymize a user.

Anonymize using default fields

ExecuteCommand("AnonymizeUser", { "jsmith" });

Anonymize using custom fields

Anonymizing users with custom fields can be useful if the institution persists data in alternate fields that should or should not be anonymized using the default anonymization fields. An example would be when personally identifiable information is persisted to the UserInfo1 field. Use care when implementing the custom field option as additional fields may be added in the future which would require additional edits to the addon. See the Aeon Database Tables for the available fields from the Users table 

ExecuteCommand("AnonymizeUser", { "jsmith", "FirstName,LastName,Address,Address2,City,State,Zip,Country,SAddress,SAddress2,SState,SZip,SCountry,EmailAddress, Phone,Fax,ID,IDType,AltId,AltIDType,DateOfBirth,Organization,PasswordHint,Password,UserInfo1" });

Addon Configuration

Addons that use the AnonymizeUser command must define an "AnonymizeUser" permission in the addon's Config.xml file. The example below defines this permission for an "Aeon Server Testing" addon:

<?xml version="1.0" encoding="utf-8"?>
<Configuration xmlns:xsi="" xmlns:xsd="">
  <Name>Aeon Server Testing</Name>
  <Author>Atlas Systems</Author>
  <Description>Outputs message to System Manager Log for testing purposes. System Manager Log should be logging DEBUG events.</Description>
  <Forms />
  <Settings />
    <File>Aeon Server Testing.lua</File>
    <Permission name="AnonymizeUser" />

This permission must then be granted to the addon in Customization Manager's server addons interface by checking the "Anonymize User" checkbox: