By nrackleff on
Is there a way to turn off user search? I tried creating a helper module and using unset($items['search/user/%menu_tail']);. This did remove the 'user' tab from the page, but I can still navigate to search/user and enter a partial username and see a list of users. How can I turn off user search altogether?
I also tried to replace search/user with a view with the same path, but the problem with that one is that it only works if you go directly to search/user and does not work if you go to search/user/deanna for instance. search/user/deanna takes you to Drupal's original user search results page.
Comments
Go to permissions and uncheck
Go to permissions and uncheck access user profiles.
We still need to allow some
We still need to allow some users to access other user's profiles, so I can't just turn off access user profiles. Here's the situation. We are going to have a checkbox where a user can opt to have their profile pubic or private. I need to create a search to only allow users who are public to search for other users who are public. I was planning to do this by turning off the regular search and replacing it with a view that would only be available to people who had checked the public box and would only return results of people who had also checked the public box, but I can't turn the generic user search off. Do you know how we might accomplish this? Thanks for your help. -Nancy