API to get user object from username
Created by: linkinpark342
Summary: Cannot get user by username, only by user_id Steps to reproduce: curl 'http://server/api/v3/users/someuser?private_token=token' Expected behavior: API returns information about user with username someuser Observed behavior: API just returns 404, since it's trying to look up the user with primary_key someuser. Possible fixes: Make it so that https://github.com/gitlabhq/gitlabhq/blob/master/lib/api/users.rb#L25 will check for a username if the input text is not possible to be an id. For example if i pass a non-numeric, it should look up by username instead
I don't know the data model intrinsically so maybe this is a bad idea, just wanted to make it as a suggestion. This makes it extremely difficult to create a new issue and assign it to a user, since you need the user_id of the user to assign it.