AnonymizeUser

You can use the AnonymizeUser function to anonymize an active Optiva user.

When to use

You can use this function when:

  • The data privacy audits require the removal of personal identifiable information.
  • Archiving or retiring user accounts while maintaining system integrity.

When not to use

You cannot not use this function if anonymisation violates regulatory or compliance requirements for record retention.

Syntax

int AnonymizeUser(string userCode, ref string newUserCode, ref Dictionary<string, object> outParams, bool isOut);

Parameters

Parameter Type Required Description
userCode string Yes The original user identifier/code of the active Optiva user to be anonymized. Must match an existing user code in the system.
newUserCode string (ref) Yes Passed by reference. After successful execution, this variable will contain the anonymized user code generated by the system.
outParams Dictionary<string, object> (ref) Yes Passed by reference. A dictionary that receives additional parameters or metadata about the anonymization process (for example, timestamp, affected records, status details).

Return Value

A value greater than zero is returned if the operation is successful.

Impact

This function permanently modifies the user record by replacing personal identifiable information with anonymized data.

Prerequisites

  • You cannot anonymize system administrator accounts or critical service accounts.
  • The compliance audit logs must be enabled and functional.
  • The target user must exist and must be eligible for anonymization.

Example

string newUserCode = "";
Dictionary<string, object> outParameterValues = new Dictionary<string,object>();
int status = AnonymizeUser("User12345", ref newUserCode, ref outParameterValues, true);
Description
This function anonymizes the user User12345, and the variables newUserCode and outParameterValues hold the anonymized user code and parameter values.