getUserByName()

The method returns the user data by the user name.

Synopsis

public shared_ptr<UserManagementUser> getUserByName(string name);

Parameter Description
name The user for whom the user data is returned.

Return Value

The method returns the user data by the user name.

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.getUserByName("para");/* Returns the user data of the user para */
  DebugN("The data of user para: ID:", usr.getId()," User name:", usr.getName());
}

Assignment

User administration

See also

getUserByOSID(), getUser()