Are prosite subscribers assigned a role..?

When user X sign sup and gets a new blog under X level can we assign a role by Level to the user during the process..

ie not wait till they are in their site and edit user role..

Multisite - marketpress - - prosites - Blog templates

So we need store owners - admin
And store buyers - subscribers..

  • Alexander
    • DEV MAN’s Mascot

    Hi @be,

    All multisite signups will be given an admin role on that site - this happens before Pro Sites even comes in to play to upgrade the blog.

    What you're asking is possible, but would require a good bit of custom coding. You'd first need to lower the default role applied when the site is created. This code will help with this:

    add_action('wpmu_new_blog','change_new_blog_role',100,6);
    
    function change_new_blog_role($blog_id, $user_id, $domain, $path, $site_id, $meta) {
        remove_user_from_blog($blog_id, $user_id);
        add_user_to_blog($blog_id, $user_id, 'editor');
    }

    That will make all new blog owners editors instead of admins. But then you'll also need to modify Pro Sites to allow the billing controls to be shown to users of a lower role. On top of that, you'll need to write code that hooks into the upgrade process and changes their role when their level changes.

    I will move this to Features & Feedback though so we can see what other community members think, and so it can be considered for future development.

    We don't undertake custom work at WPMU DEV, but if you need to hire a developer, I'd strongly recommend checking our our job boards: https://premium.wpmudev.org/wpmu-jobs/

    Best regards,

  • Alexander
    • DEV MAN’s Mascot

    Hi @be,

    I don't expect this one to be a feature because it is quite specialized. Pro Sites is built to extend Multisite with billing and level restriction features.

    Multisite by default sets up users as site administrators. So if Pro Sites changed this, it could cause problems.

    Overall, this sounds like a job for a new plugin altogether.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.