DeleteUser Command

The DeleteUser command will delete the specified user and related links. This command is available for server addons.

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

DeleteUser Parameters

NameDirectionTypeDescription
Usernamein stringThe username that should be deleted.

Deleted Data

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

Transaction Deletion Criteria

  1. If the transaction has no researcher and the transaction's username is the same as the user being deleted, the transaction is deleted.
  2. If the transaction has a researcher, but the transaction's user is being deleted, the transaction is reassigned to the researcher.
  3. If the transaction has a researcher who is being deleted, the researcher is removed from the transaction, but the transaction continues to belong to the original owner.

Updated Tables

Records are deleted from the following tables for the specific user being removed:

  • Alerts
  • UserHistory
  • UserNotes
  • UserImages
  • EmailCopies
  • Files
  • FileInformation
  • UserChangeHistory
  • ProxyLink
  • WebSession
  • UserValidation
  • UserAccountLinks
  • BillingGatewayTransactionLinks
  • BillingGatewayTransactions
  • ActivityHistory
  • ReadingRoomHistory
  • Users

Example

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

Delete using default fields

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

Addon Configuration

Addons that use the DeleteUser command must define a "DeleteUser" 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="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <Name>Aeon Server Testing</Name>
  <Author>Atlas Systems</Author>
  <Version>1.0</Version>
  <Active>True</Active>
  <Type>Server</Type>
  <Description>Outputs message to System Manager Log for testing purposes. System Manager Log should be logging DEBUG events.</Description>
  <Forms />
  <Settings />
  <Files>
    <File>Aeon Server Testing.lua</File>
  </Files>
  <Permissions>
     <Permission name="DeleteUser" />
  </Permissions>
</Configuration>

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