Skip to main content

Automatically add members to all spaces

How can I set it up so that new members automatically have access to all spaces?

David Carton

Do you use Fluent cart? Or Fluent Crm?Yess? That is the way you can set it up with tags or integration.

Kilian Ivers

David CartonΒ no, just fluent community. is there any other way without fluent cart or fluent crm?

David Carton

You have automation plugin? With fluent community integration? And how do you ad them now to your community? Can you tell me the flow?

Kilian Ivers

David CartonΒ Currently, a user is created in WordPress from Zoho CRM using a Webhook. This user then has access to the community because their role is "Subscriber." There isn't any further automation at the moment :-(

David Carton

Kilian IversΒ  we could take and create much with webhooks and stuff, but my advise is Fluent Crm. They work so good. For low price. Best support. And community ;) There is e deal now. https://fluentcrm.com/deal/?utm_source=fcrmsite&utm_medium=banner&utm_campaign=special26&utm_id=special+deal

Just say, its not selling i am doing. Its advise ;)

David Carton

Just a click away ;)

1.00

David Churchill

It's easy to do, have a look at the Developer Docs https://dev.fluentcommunity.co/guides/code-snippets

Use something like this (just add it to your Themes functions.php file or use FluentSnippet plugin)

add_action('user_register', function($userId) {
    if (!class_exists('\FluentCommunity\App\Functions\Utility')) {
        return;
    }

    $spaces = \FluentCommunity\App\Functions\Utility::getSpaces(false);

    foreach ($spaces as $space) {
        if (($space->status ?? '') === 'published' && ($space->type ?? '') === 'space') {
            \FluentCommunity\App\Services\Helper::addToSpace(
                $space->id,
                $userId,
                'member',
                'by_admin'
            );
        }
    }
}, 20, 1);

The Utility::getSpaces(false) returns all spaces including drafts, so you can use the status check to skip unpublished ones and only add users to Published Spaces. The by_admin flag means it's treated as an admin-initiated join rather than the user opting in themselves.

Kilian Ivers

David ChurchillΒ thanks, i will try it :-)

Claudy Scoufy

David CartonΒ suggested the right approach.
FluentCRM (free version) is really the simplest solution β€” no hook needed, everything is done through the settings. Just create a tag in FluentCRM, then in FluentCommunity Settings β†’ Access Management map that tag to each of your spaces. Any new member who receives the tag is automatically added.

Official doc: https://fluentcommunity.co/docs/access-management-through-fluentcrm-tags/

David Carton

Claudy ScoufyΒ Yess like i said. But i would recommand the paid version ;)

1.00