Problems with users of a multi-site installation

My installation is multisite, I am using the Rental hive Theme and its plugins

I am building a site with 4 stores

On the main site I have the informative website, and it has ID 1

Then there are the secondary sites of the network with IDs 2, 3, 4, 5

If a user, let’s call him Pedro, uploads a property on site 2, everything works normally on that site, as a Host he can accept reservations from any user on that same site (ID 2) and can send him messages.

But if another user, let’s call him Juan, who registered on site 5, or 3, or 4, requests a reservation from Pedro who has a property on site 2, he cannot accept his reservation, the link does not work, and It also cannot send you messages, that is, the links fail, there is no communication.

Pedro, can upload properties on sites 2, 3, and 4 or on any that are added in the future, but he will not be able to accept (sell) any user, except the users where he initially registered, site 2, on the other sites, (2, 3, and 4 or future sites), will NOT be able to accept reservations, nor send messages

In conclusion, for the reservation process to work, in a multisite installation, both user and Host must have registered, or exist, on the same site where the store is located, the additional problem is that when a user registers on either sites, you can no longer register on another site on the same network, because the system will indicate that there is already a user with that email.

A likely, and I think the only solution, is that when a user registers on one site, it is automatically created on all sites in the network as well, and when they upload a property on any site, just as is currently the case, they get the collaborator role, only in this way would business between users of a multisite work, THIS FUNCTION IS ESSENTIAL FOR OPERATION IN A MULTISITE

In a multisite installation, users can lock themselves anywhere on the network, and in theory they should be able to book in any of the stores on that network, but with this theme and hive press plugins, I don’t see how to make it work, since if You can start the reservation process, and it even reaches the Host, but he cannot accept the reservation or respond to messages.

Previously, I had already requested support about something similar, I found the answer myself on the forum and responded that the user should have the Contributor role, but that is not entirely true, the reality is that all users must exist on each site of the network to be able to interact with reservations and messages, that is, so that everything works.

To make everything work, users could be added manually from the WordPress administrator to the other sites on the network, but this would be unmanageable and disastrous.

I hope I have explained myself clearly, but above all I hope you can help me with the solution to this problem, which is essential for the multisite environment, I can almost say with certainty that it is the only thing needed for everything to work great

Thank you so much

I think your problem not related to hivepress,
thats how multisite manage its user,
and u need to know well how the user managed by multisite…
there is several plugin with that feature to help with the problems you are facing…

I can say that because I don’t see hivepress officially supporting multi-tenant,
or at least multisite, seeing that the license is offered only for single sites.
and definitely requires an additional license to use it on several sites.
So the solution for managing users on a multisite through the use of third party plugin.

1 Like

Hello
laboratory

Thanks for your answer,

In theory, a Multisite installation is Unique, since it is carried out on a single domain, hence many expert developers maintain that a plugin or Theme that does not work on a multisite, we should not use it in a simple installation either.

That said, I can say that Hivepress plugins and themes, or at least the ones I’m using, work normally in a Multisite installation,

The truth is that with the functionality that I indicate it would be wonderful

Surely you can also get users automatically added on all sites on the network by customizing WordPress, someone on a WordPress forum gave me the following code, but it doesn’t work.

function multisite_register_user($user_id, $user_object, $password) {
  // Obtener todos los sitios de la red
  $sites = get_sites();

 // Go through each site
  foreach ($sites as $site) {
    // If the user does not exist on this site, create it
    if (!get_user_by('id', $user_id, $site['blog_id'])) {
      wpmu_create_user($user_object->user_login, $password, $user_object->user_email, array('first_name' => $user_object->user_firstname, 'last_name' => $user_object->user_lastname));
    }
  }
}

add_action('user_register', 'multisite_register_user', 10, 3);

If anyone can help me with a code snippet that works for this purpose that would be great.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.