multisite-rest-api
multisite-rest-api copied to clipboard
Assign User to Blog
I am having no luck at all with Assign User to Blog. I get "'blog_id' is not recognized as an internal or external command,", and it's not blog, either. The syntax is a little confusing, as sometimes the values are escaped with a backslash, sometimes not.
I'd really appreciate a review of the given syntax, as it seems to not be working.
As a workaround for this issue, I had Perplexity write me a plugin and network activated it. For interested parties, the code is
ID, $blog_id)) { // Add the Super Admin as an administrator to the new site add_user_to_blog($blog_id, $super_admin_user->ID, 'administrator'); } } }