Since v2.0 of the API, you are not supposed to use usernames at all – and that´s why you can´t query users by their username anymore. The only way to get access to data of a user is by authorizing that user and using the /me
endpoint.
Main rule: Forget about users who did not authorize your App, you are not supposed to get any data of those for privacy reason.