0

When a user tries to search for another user, the search returns no result, however, when it searches for a node e.g article, questions etc it returns a matching value immediately with search autocomplete. What is wrong?

Permissions are ok and user is set as default in settings. I want users to be able to search users, nodes, location or whatever available and matches their query.

1 Answer 1

1

In order to allow non-admin users to search for other users on your site, you'll need to give the appropriate user role (typically "authenticated users") permissions to "view user profiles" and "use advanced search". To access User search, you can utilize the "Advanced search" link in the Search block, or use the URL /search/user

Note, these permissions will also allow users to see other users' profile pages, so make sure this is acceptable for your use case.

If you need to search both nodes and users from the same text box, you'll need more than Drupal's Core search functionality to do so. See How to search both Users and Nodes simultaneously in drupal 7 for some suggestions.

4
  • Copied this from the description of search_api_multi Please note that, since multi-index searches aren't supported explicitly by the Search API, most other Search API add-on functionality (facets, autocomplete, saved searches, search pages, etc.) won't work with searches created with this module.
    – Umair
    Aug 14, 2016 at 15:24
  • What if I only want users to search users
    – Umair
    Aug 14, 2016 at 16:51
  • If you only want to search users, you only need to follow the first paragraph of my answer. That will get you a search for only users. If you'd like a user search block you can place, you might try installing the drupal.org/project/block_search_user module, and placing the block it defines as you would any other block.
    – hampercm
    Aug 14, 2016 at 20:51
  • Why cant I search a user normally? like nodes
    – Umair
    Aug 15, 2016 at 6:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.