This project has moved. For the latest updates, please go here.

Unique ID

May 16, 2012 at 4:56 AM

Hello,

 

With this library, is it possible to pull a users unique id based off of their name?

 

 

Also, is this possible to be done without server admin access?

Coordinator
May 16, 2012 at 10:31 AM

Hello,

sure it is possible. To find a client named "Scordo" and to get his unique id:

ListResponse findResponse = queryRunner.FindClientDatabaseIds("Scordo");

if (findResponse.Values.Count > 0)
{
	ClientDbInfoResponse clientInfoResponse = queryRunner.GetClientDatabaseInfo((int)findResponse.Values[0]);
	Console.WriteLine("UniqueId: {0}", clientInfoResponse.UniqueId);
}

 

To find all users haveing an "i" in their names:

 

ListResponse<uint> findResponse = queryRunner.FindClientDatabaseIds("%i%");
List<ClientDbInfoResponse> clientInfoResponseList = findResponse.Values.ConvertAll(id => queryRunner.GetClientDatabaseInfo((int)id));
// clientInfoResponseList[0].UniqueId <-- the first unique id of the found users

But I think it won't be possible without serveradmin.