automate creation and deletion of users accounts when logging in and out of cache.

Is their a way to (setup) automate the removal of users accounts from the system once they have logged out of cache and than recreate them once they log in, so basically the user list only contains live logged in users plus some of the default user accounts.

  • 0
  • 0
  • 92
  • 2
  • 2


Hi Richard,

You can create and delete accounts via the %SYS namespace using the following class methods...

It sounds like you might want to take a look at delegated authentication as well...

If this is just for a CSP application then you can  detect the user logging out or a session timeout using the %CSP.SessionEvents class.


The Audit Log can actually give you that information already.  If you audit Login and Logout events you can then use SQL to see what's going on in the system.  Here's a query to get started (in the %SYS namespace):

SELECT UTCTimeStamp,Username,Event
 FROM %SYS.Audit


Just seeing if it is possible,  the end goal is so that we only have live users setup on the system and don't have any dormant accounts laying around