Get profile information about a Two plus Two Forum member given the username.

def twoplustwo_player(username):
    """Get profile information about a Two plus Two Forum member given the username."""

    from .website.twoplustwo import ForumMember, AmbiguousUserNameError, UserNotFoundError

    try:
        member = ForumMember(username)
    except UserNotFoundError:
        raise click.ClickException('User "%s" not found!' % username)
    except AmbiguousUserNameError as e:
        click.echo('Got multiple users with similar names!', err=True)

        for ind, user in enumerate(e.users):
            click.echo('{}. {}'.format(ind + 1, user.name), err=True)

        number = click.prompt('Which would you like to see [{}-{}]'.format(1, len(e.users)),
                              prompt_suffix='? ', type=click.IntRange(1, len(e.users)), err=True)

        userid = e.users[int(number) - 1].id
        member = ForumMember.from_userid(userid)

        click.echo(err=True)  # empty line after input

    _print_header('Two plus two forum member')
    _print_values(
        ('Username', member.username),
        ('Forum id', member.id),
        ('Location', member.location),
        ('Total posts', member.total_posts),
        ('Posts per day', member.posts_per_day),
        ('Rank', member.rank),
        ('Last activity', member.last_activity),
        ('Join date', member.join_date),
        ('Usergroups', member.public_usergroups),
        ('Profile picture', member.profile_picture),
        ('Avatar', member.avatar),
    )