Question
· Oct 10, 2018

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.

Discussion (4)1
Log in or sign up to continue

Hi Richard,

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

https://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?PAGE=CLASS&LIBRARY=%25SYS&CLASSNAME=Security.Users

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

https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GCAS_delegated

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.

Sean.