I am working on a page within a WordPress multisite install.
I am using wp_insert_user()
to add users. I need to do this programmatically.
The problem I have is with the roles. Every time I create a user, all roles are added to this user. It seems to happen both when I don't specify a role and when I specify only one role.
Does anyone know why this is happening? Is this the default behavior when adding new users?