There could exist use cases where it would be interesting to search in all fields present in user profiles even if some of them are not directly visible or editable by users in the profile directly.

Comments

hernani’s picture

The following patch adds an administrative setting that when set allows to passtrough profile fields privacy and search directly on all of them.

davemybes’s picture

This could be useful in some cases, so seems like a good thing to include in the module. Your patch needs one more thing, though (I believe), and that is to include the "search user profiles" perm in your new perm check:

if (variable_get('profileplus_passthrough_field_privacy', FALSE) || user_access('administer users')) {

becomes

if ((variable_get('profileplus_passthrough_field_privacy', FALSE) && user_access('search user profiles') || user_access('administer users')) {

If you don't do that, then any user can search profiles if you have the variable set to TRUE. Unless that's what you were wanting...?

james marks’s picture

I'd be inclined to agree with the addition of the inclusion of the "search user profiles" perm. I'll take a closer look at it and patch the module if there aren't any other issues.