def get_user_name(user, full_name=True):
    """Return the user's name as a string.
    Full names by default.
    """
    try:
        if full_name:
            name = ' '.join([user.first_name, user.last_name])
        else:
            name = user.first_name
    except AttributeError:
        name = None
    return name
