Yes, at this point, the user is expected to be in the "User Information List" in which they would indeed have an id. If they are not yet in this list, I am not sure you can add them with code in this case.