Separate user bases or hide users of another role or connected to another minisite

Đã có trọn bộ đề thi thử THPT Quốc Gia 2022 các môn: vip.dethihsg247.com

I am creating a WordPress site in which I want to create mini-sites/sub-sites meaning each of them has their own separate user base. Alternatively, it’s ok that all the users are in the same base, but that users that are not in the same role, group or those connected to a subsite are hidden. This could be done either with a plugin or that I create a PHP function.

I have looked through many plugins. WordPress multisite have a shared user base. My PHP skills are very limited, but I can understand it when I read it and modify simple things. I saw that it’s possible to add_action('pre_user_query','xxxx');

I’ve tried the plugin “Members”. However, if identifying the user’s role through $current_user->roles[0] and I don’t know how to create a code that hides users that do not have the same role.

TL;DR

Can anyone suggest a plugin or a PHP function that allows to either have separate user bases for subsites in one WordPress installation or which allows to hide users of another role or connected to another subsite when using the plugin Multisite? I’m also open to hear other solutions that I may not have thought about.

Thank you!!

Xin chào các bạn và quý Thầy Cô. Hãy nhập từ khóa mình muốn vào ô tìm kiếm trên Website để tìm kiếm mọi thứ hoặc trên google các bạn hãy nhập từ khóa + dethihsg247.com để tìm kiếm các bài viết của chúng tôi nhé.
  • Hiện tại chúng tôi có hơn 25 nghìn bài văn mẫu các thể loại.
  • Kho tài liệu, đề thi học sinh giỏi các lớp vô cùng phong phú.
  • Mỗi ngày cập nhật hơn 100 đề thi chất lượng từ các website bán tài liệu lớn.

Tải đề thi VIP với giá siêu rẻ tại Vip.Dethihsg247.Com