Restricting user data visibility
-
Hi All,
I’m developing a website where I want maximum privacy between users. i.e. users must not be aware of other users on the site, unless they below to the same ‘company’ (a field I created in user_meta). The very presence of a user is commercially sensitive information to my users….
I have restricted the users visible in a ‘pre_user_query’ filter, changing the SQL query to look for only those users who share the same company ID, and this works well, show by looking at the rest interface (for example):
/wp-json/wp/v2/users/However, I’m struggling with finding a way to stop
/wp-json/wp/v2/users/1
or
/author/fred
from revealing customer data.Any pointers appreciated…
Simon
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Restricting user data visibility’ is closed to new replies.