@vfavrat,
You have to use the role slugs to set the roles in the list.
Can you check if are you writing the role slugs correctly?
Hello !
I am sure that I write the slugs roles the right way because the users are created with correct roles but just if I put just one.
I try to add a second role by updating the users with their second roles and choosing the option “Yes, add new roles and not override existing ones”. But it does not work either. The first role is overwritten by the second one.
An example (2 first rows of the csv) :
“username” “email” “last_name” “first_name” “role” “nickname” “display_name” “show_admin_bar_front”
“truc.machin” “[email protected]” “MACHIN” “Truc” “parents_ps_ms,pour_tous” “Truc” “Truc MACHIN” “false”
To help, it is the last role that it is keeping. The roles are all red but just the last one is kept.
When the role does not exist (or is miswritten) there is an error message.
I have just try in another blog and it is OK. The issue is only with the multisite one. Is it possible that the issue is due to the multisite ?
Or is it possible that another plugin can cause this issue ?
I use something like this: $user_object->add_role( $role );
https://developer.ww.wp.xz.cn/reference/classes/wp_user/add_role/
This function does not mention something about multisite, so it should not be a problem there…
Surely the problem is with another plugin.