Right, so data is missing PasswordResetProviderId (and probably AuthenticationProviderId). You can extend by checking for other "false" values too, like seeing if data['AuthenticationProviderId'] etc. is None, if it's an empty string once stripped and so on.
... or just unconditionally set them in data, which might be the easiest thing to do, but probably not the cleanest:
PHP Code:
if 'AuthenticationProviderId' not in data:
data['AuthenticationProviderId'] = 'Jellyfin.Server.Implementations.Users.DefaultAuthenticationProvider'
if 'PasswordResetProviderId' not in data:
data['PasswordResetProviderId'] = 'Jellyfin.Server.Implementations.Users.DefaultPasswordResetProvider'
... or just unconditionally set them in data, which might be the easiest thing to do, but probably not the cleanest:
PHP Code:
data = {
'EnableAllChannels': False,
'EnableAllFolders': False,
'EnableContentDownloading': False,
'EnableLiveTvAccess': False,
'EnableLiveTvManagement': False,
'EnableSharedDeviceControl': False,
'SyncPlayAccess': 'None',
'AuthenticationProviderId': 'Jellyfin.Server.Implementations.Users.DefaultAuthenticationProvider',
'PasswordResetProviderId': 'Jellyfin.Server.Implementations.Users.DefaultPasswordResetProvider',
}