if you are using ULib, then it is really easy.
If you are trying to return a player object so that you can use it in your code you can do the following.
ULib.getUser(partialname)
this will return the user with that partial name or an error if there are more than 1 results.