Skip to content

Commit

Permalink
*8439* Fixed manager's enrollment search for reviewer interests
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Feb 3, 2014
1 parent 1f5b50b commit 1f5e8d1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions classes/user/PKPUserDAO.inc.php
Expand Up @@ -435,9 +435,10 @@ function &getUsersByField($field = USER_FIELD_NONE, $match = null, $value = null
break;
case USER_FIELD_INTERESTS:
$interestDao =& DAORegistry::getDAO('InterestDAO'); // Loaded to ensure interest constant is in namespace
$sql .=', controlled_vocabs cv, controlled_vocab_entries cve, controlled_vocab_entry_settings cves
WHERE cv.assoc_type = ' . ASSOC_TYPE_USER . ' AND cv.symbolic = "' . CONTROLLED_VOCAB_INTEREST . '" AND cve.controlled_vocab_id = cv.controlled_vocab_id
AND cves.controlled_vocab_entry_id = cve.controlled_vocab_entry_id AND LOWER(cves.setting_value) ' . ($match == 'is' ? '=' : 'LIKE') . ' LOWER(?)';
$sql .=', controlled_vocabs cv, controlled_vocab_entries cve, controlled_vocab_entry_settings cves, user_interests ui
WHERE cv.symbolic = "' . CONTROLLED_VOCAB_INTEREST . '" AND cve.controlled_vocab_id = cv.controlled_vocab_id
AND cves.controlled_vocab_entry_id = cve.controlled_vocab_entry_id AND LOWER(cves.setting_value) ' . ($match == 'is' ? '=' : 'LIKE') . ' LOWER(?)
AND ui.user_id = u.user_id AND cve.controlled_vocab_entry_id = ui.controlled_vocab_entry_id';
$var = $match == 'is' ? $value : "%$value%";
break;
case USER_FIELD_EMAIL:
Expand Down

0 comments on commit 1f5e8d1

Please sign in to comment.