System.GetUserSID

string System.GetUserSID ( 

string UserName )

Example 1

strUserName = "test_user1";
strUserSID = System.GetUserSID(strUserName);
if (strUserSID == "") then
    strMessage = "ERROR: Unable to get SID for \""..strUserName.."\" code: "..System.UserSIDError.. "\r\n";
    SetupData.WriteToLogFile(strMessage, false);
end

Gets the SID value for the user name "test_user1" and if it fails, writes the system error code to the setup log file.

See also:  Related Actions