def get_member_by_name(slack_client, user_name):
    """
    Return the member matching the given user_name.
    """

    memberList = slack_client.api_call("users.list")

    if memberList and memberList['members']:
        for member in memberList['members']:
            if member['name'] == user_name:
                return member

    return None