MySource Matrix Developer

Main Content

Activation Escalation for Pending Accounts

Summary

This development will allow for actions to be taken when a user created through an Account Manager, that requires email activation, remains unactivated for a certain period of time. Such actions may include the re-sending of the activation email, or the deletion of the account.

Status: Complete
Key: draft -> approved proposal -> scheduled -> in development -> in testing -> complete -> released

Estimated Start Date: Tue, 11 Apr 2006
Estimated End Date: Fri, 14 Apr 2006

Planned Release Version: 3.10.0 RC1

Problem Definition

Currently, an option exists in the Account Manager that allows users created by that asset to be placed in a "Pending Accounts" user group, located underneath the Account Manager, until that user responds to an activation email. Currently, nothing is available to prune these users, or remind them to activate their account.

There should be the ability for the Account Manager to perform certain actions after an account has been left unactivated for a certain period of time (say, 2 weeks). Examples of such actions include (but are not limited to):

  • Re-sending of the activation email
  • Automatic deletion of unactivated accounts, allowing those account names to be re-claimed

The functionality developed should be extensible for further actions to be developed, and use and extend currently existing where appropriate. This functionality overlaps with both the Cron and Trigger subsystems to a small extent.

Technical Specification

This functionality can be built a number of ways:

  • Setting a number of Cron Jobs, one for this action. This has the ability to be extensible, allowing further actions to be built in a manner detached from the Account Manager. However, this is very resource-consuming and adds a very large number of assets to the system. Also, it is difficult to know which Cron Jobs have been set by the Account Manager unless the only ones allowed to be set are Account Manager-specific.
  • Using a single Cron Job (running over all Account Manager assets in the system), and then adding the re-send/delete information as an attribute in the Account Manager. However, this is inadvisable, as dealing with such a large array - as it would be in larger systems - would result in performance and memory issues.
  • Using a single Cron Job as above, and peforming the Account Manager's actions if the time to perform it is within the 'next run' time of the Cron Manager (eg. if the cron runs on the hour, it will perform all actions required in the last hour). This will not work for re-sending activation emails, however, if the Cron Manager is deadlocked at the time the action is due to be performed, without a flag to say that the action has been performed already. This flag can be stored in a number of ways:
    • Adding the information to the value of the link between the Pending Accounts and the user. However, the link value field is already used to store the create locations that the user will be placed into when the account is activated.
    • Adding one or more extra links - either NOTICE links or "shadow links" - that represent re-send and delete actions. The links can either be created upon creation and removed when actions are triggered, or created when actions are triggered to say "this action has been performed already". All extra links would be removed when the account is activated. This method would greatly increase the number of links within the system (especially for larger systems), which would slow database queries to the linking tables - particularly the link tree table.
    • Changing the type of the link between the Pending Accounts user group and the user to indicate the activation email has been re-sent (from TYPE_1 to TYPE_2, say). This method limits the number of automatic activation email re-sends to one.

Of these, the single cron job option will be used, using the link type as a flag. This will limit the number of activation email re-sends to one, however this is seen as the option with the minimum amount of overhead, given current requirements (which do not currently require the sending of multiple reminder emails). As the link between Pending Accounts and the Account Manager is typically set as TYPE_2, the link type change should not have any unintended meaning.

Implementation

The following new development will be required for implementing this feature:

  • New attributes in Account Manager, specifying the time periods for re-sending and purging accounts - to be of the "Duration" attribute type. To be placed in the Email Validation section of the Details screen.
  • One new, continuously-running Cron Job - tasks that should be performed are:
    • Search for all Account Manager assets in the system, that have email validation turned on.
    • From these, search for users that are TYPE_1 linked to the Pending Accounts folder (users are initially placed into this folder as TYPE_1 linked), whose create date is older than the "Re-send Activation Email" time-out. Re-send the activation email to these users and change their link type to TYPE_2.
    • Also from these, search for users linked to the Pending Accounts folder (any link type), whose create date is older than the purge time-out. Delete these users (trashing them first, if necessary).