I have a user form, and I have views to display the users.
I want to filter and display the users based on the currently logged-in user.
For example,
I have two admin users who should access the view and check the registered users. (Admin1,Admin2)
What I have now is:
Two different views filtered by the organization field, and each added to a different page. So, each admin should access his page.
What I want:
One view on one page
If the current logged in user is Admin1 (display all users where the organization = Org1 )
If the current logged in user is Admin2 (display all users where the organization = Org2 )
Hello. Thank you for contacting the Toolset support.
Please note that you can create the custom search view for view queries post types only. You can not create custom search for user/taxonomy kind views.
It seems you want to filter your user view based on the organization custom field.
If this is true - you should create a user view that query your user role and add a query filter to filter your user view by your organization custom field that should be filter by using shortcode attribute. Screenshot: hidden link
The on the page where you want to display your view, you should add a conditional block to check for current user ID for admin1 and add your view with shortcode using "Fields and Text" block with view's shortcode attribute as:
Again, create a page where you want to display org2, add a conditional block to check current user ID for admin2 and add your view with shortcode using "Fields and Text" block with view's shortcode attribute as: