Am I missing something here? There should be a method to check if a user exist, which doesn't throw an error if it doesn't. EnsureUser() is not applicable, because that method creates a new user if it doesn't exist.
At the time, this is what I do, but I think it should be easier in some way.
var userName = @"DOMAIN\UserName"
var userString = string.Empty;
try
{
SPUser user = web.AllUsers[userName];
userString = user.ID + ";#" + user.LoginName;
}
catch (Exception e)
{
//The user does not exist, but it's okay
Console.WriteLine("The user does not exist, but it's okay: " +e.InnerException);
}