def personal_id(request):
    """Get the OPN personal profile ID for the authenticated profile."""
    wallet_info = request.wallet_info
    if 'personal_profile' in wallet_info:
        return wallet_info['personal_profile']['id']
    profile = wallet_info['profile']
    if profile['is_individual']:
        return profile['id']
    # Personal profile not provided. Old version of OPN?
    return ''