moodle api rest call in c# fails in core_user_create_users with preferences array

Re: moodle api rest call in c# fails in core_user_create_users with preferences array

by Harmen Stoopendaal -
Number of replies: 0

Change te preferences  value "1" into 1 (it must be an integer value)


String postData = String.Format(@"users[0][username]={0}&users[0][password]={1}&users[0][firstname]={2}&users[0][lastname]={3}&users[0][email]={4}&users[0][preferences][0][type]={5}&users[0][preferences][0][value]={6}", user.username, user.password, user.firstname, user.lastname, user.email, "auth_forcepasswordchange", 1);