Written by

Senior Startups and Community Programs Manager at InterSystems Corporation
Question Evgeny Shvarov · Feb 5

How to check if the system user with the name "John" already exists in IRIS via SQL?

Hi Folks!

Have a very simple question, I hope :)

How can I make sure that user 'John' is already created in the IRIS system?

Preferabbly via SQL?

thanks a lot!

Product version: IRIS 2024.3

Comments

Stephen Canzano · Feb 5

name($Username) or fullname?

some form of

select name,Fullname from security.Users

with the appropriate where clause would work, albeit it has to be run in %SYS.

0
Hannah Sullivan · Feb 5

Additionally, non SQL, there is a built in function for this of

if##class(Security.Users).Exists("John") {
    // user exists
}

which confirms if the IRIS user exists using the users username (here, assuming username of John). Documentation on the Security.Users docs page.

0