getUserByOSID()

The method returns the user with the specified OS ID.

Synopsis

public shared_ptr<UserManagementUser> getUserByOSID(string osId);

Parameter Description
osId The OS ID of the user who is returned. See example below.

Return Value

The user with the specified OS ID.

Errors

Errors are shown in the log viewer.

EXAMPLE

#uses "classes/userManagement/UserManagement"
main()
{
  shared_ptr<UserManagement> userMgm = UserManagement::getInstance();
  shared_ptr<UserManagementUser> usr;
  usr =  userMgm.getUserByOSID("-1-7-21-74384048575-35274985050-90464748-1001");
  DebugN("The user with the OS ID -1-7-21-74384048575-35274985050-90464748-1001:", usr.getId()," User name:", usr.getName());
  /* Returns the user with the OSID above. To test the function, use your own OSID */
}

Assignment

User administration

See also

getGroupByOSID()