The C script access the users created in the WinCC User Administrator.
In SIMATIC Logon V1.2 and higher there is however the possibility in SIMATIC Logon that a "Default User" is logged on automatically when a logged-on user logs off. In this way with a mouse-click you can elegantly save yourself configuring by script. Detailed information on setting the "Default User" is available in the manual "SIMATIC Logon", section 18.104.22.168. The manual is available in Entry ID: 34519648 .