Array, Property Setters, and Using ##class(Security.Users).Modify... to Disable a User Account from the Terminal

Primary tabs


I am wondering the best way to disable a user account using this class in Cache (Security.Users).


Example User Account = jhipp

Currently is Enabled


I know that we can use the auto-generated EnabledGetStored method, for example:

%SYS> w ##class(Security.Users).EnabledGetStored("jhipp")


There is not an auto-generated method to set this property, right?


I can modify this property with the Modify function, but I have to build a temp array with one value etc...

%SYS> s temp("Enabled")=0

%SYS> zw temp


%SYS> w ##class(Security.Users).Modify("jhipp",  .temp)


Is there an easier way to do this, such as an auto-generated setter function or a shortcut for the array similar to this?


%SYS> w ##class(Security.Users).Modify("jhipp", "Enabled" = 0)



Just wanted to verify that there was not an easier way.





  • 0
  • 0
  • 75
  • 1
  • 1


the class documentation has a special warning:

The table for this class should be manipulated only through object access,
the published API's or through the System Management Portal.
It should not be updated through direct SQL access.


As Security is a sensitive subject I think any other approach could cause serious damage or at least a risk.

Thanks Robert. I missed that warning when I was reading through the docs. That makes sense.

Appreciate the clarification.

  • James