def user_in_group(user_entry, group_name):
    """Check if a user is in a group. Note this will return false for the special group "public", even
    though all users are technically in this group."""
    try:
        return group_name in [g.name for g in user_entry.groups]
    except AttributeError as UserNotSignedIn:
        return False