Ok, so this isn’t possible to do by default.
As I already had a hook for wpmu_activate_blog()
I just created another with a lower priority which will be fired after. This function also has the 2 parameters I need. So upon activation of the account I simply remove Admin role and set a new role based of the subscription service level.
add_action( 'wpmu_activate_blog', array( $this,'set_new_user_role' ), 15, 2 );
public function set_new_user_role( $blog_id, $user_id ) {
$user = new WP_User( $user_id, '', $blog_id );
$user->remove_role( 'administrator' );
// @NOTE - Set this role depending on user subscription level.
$user->add_role( 'subscriber' );
}
Related Posts:
- Why are my roles not visible in a Multi-site/Network?
- Prevent user creating new users with specific roles
- WPMU – new users are automatically subscribed to the main blog – how to prevent that?
- Update User Role Across Network when Main Site User is Updated
- Assign role to user on first login, if they are first (after admin)
- Get the User ID Who Owns a Given Blog ID in Multisite
- Make a user administrator to a sub directory site and a contributor to main site in multisite network
- How to change user starting role in WordPress MultiSite?
- Create Custom Multisite User Role to Reduce Capabilities
- Copy user role on multisite so the user can access subsites with same role
- can’t create user without email for an author after converting single site to multisite
- Easily adding multiple existing users to a multisite site
- A different role for each site in a multisite
- How to create child/sub user under parent user
- How create a multisite setup with “phantom” accounts and passwords?
- Is there any way to give all users access to one blog in a multisite network without using a plugin?
- How To Add Custom Form Fields To The User Profile Page?
- Where are available Roles Defined in the wp_ database?
- How to use same email for multiple users
- Where can I find documentation on what characters are allowed in user names and why?
- WordPress Multisite allow site admin to add user without email confirmation
- Troubleshooting a “You do not have sufficient permissions to access this page” error
- Network not displaying all sites and users
- Give to site admin the option to “skip confirmation email” when adding new user
- Different back-end colour scheme for the different sites of a multisite
- Set up collaborative site
- How can I display all Multisite blogs where this user is administrator?
- Add role across network in multisite
- Restrict users on multisite WordPress install
- Possible to make custom role in multisite that can add sites?
- Can you have multi-site WP and keep users separate?
- WordPress Multisite Layered Admins
- How to add multiple existing users to a multisite site?
- How to get a user role of a specific blog in multisite?
- the blog owner multisite
- Identical members roles on all sites in a multisite
- How can I get multisite primary blog (url or path) for current user?
- Can I use multisite functions in a single-site installation?
- How can I delete a user from entire multisite nework
- delete_user_meta : how to delete all the metadata of a given user (witout SQL)
- How to search users globally on a multisite install?
- Within the database, where is the flag which says that a user has Super Admin rights?
- Avoid having infinite loops
- Create custom role, multisite, add users/sites?
- Displaying a message upon user registration
- access the plugins for each role in WordPress multisite
- Allow Author on Site A capability to upload files on Site B in Multi Site
- Multisite – One user allowed access to all sites?
- Add a user to a specific blog when they register?
- Four columns in the wp_users table
- Good way to block users within a multisite setup without deleting them?
- Subsite access without being a member of the subsite in wp multisite network
- Multisite user roles – capabilities not working
- WordPress stuck in deleting user
- Admin permission for creating blogs in multisite
- How to display users with posts published between two dates (Sorted by Post-Count) [Multisite]
- Get users registered 30 days ago(or more)
- Multisite – maximum number of users with specific role
- Understanding State in WordPress Multisites
- Remove superadmin role from the “change role to” menu in user listing
- How to change a user role after registering in multisite?
- How To Disable Add new users On Subsites In Multisite?
- How to sync roles across Multisite?
- Wait ajax to complete before continue loop
- Delete user from multisite when removed from subsite
- Combining user database tables while keeping all other data in seperate for multiple sites?
- How to delete user from MU site when the user is removed from their site?
- Sharing users across multiple sites, each on their own database
- WordPress multisite, allow non super admins to create sites
- How to share User Database between Two Multisite Installations + More
- Creating teams of users in WordPress
- Give users acces to admin a single post or set up WP network?
- Restrict users of site 1 to login in site 2 in wordpress multisite
- “My Sites” incorrectly showing all network sites for all logged in users
- Language per user role, how can I achieve this?
- Admin users not able to see network menus
- Possible to have duplicate usernames on different two multisites
- Multisite – each site with it’s own set of users
- Modify new user email notification in network admin screen wp multisite
- User Roles in multisite – odd behavior
- Users getting linked unwanted to main mu in WordPress multisite (WPMU)
- Multisite – site user limited only for this site
- WordPress single sign on using cookies with shared user role functionality between more than 2 wordpress subdomains
- Importing Posts into New Website with Same User ID’s
- WordPress automatic Login on other page?
- Is Multisite the RIGHT option for my case?
- Should I use MultiSite for a subdomain based wp site?
- Multisite “Skip Confirmation Email” Log Out Problem
- Get current user outside of WordPress Multisite
- WordPress MU users – how are they organized?
- Get users from all/specific blog by user_role and current_user role
- How can I display all Multisite blogs where this user is administrator?
- WordPress multi user registration sites
- How to give “author” user role appropriate capabilities to add PollDaddy polls? WordPress multisite
- Multisite and users being listed on network administration dashboard and not main site dashboard
- Using a number for limiting registering or banning on multisite
- Unsure of my options, Multi-blog?
- WordPress Multisite (Network) some site users added to main site users list as subscriber
- WordPress Multisite restict user access
- Change a subsite Admin role of a WordPress Multisite after 24 hours registering