Skip to content

Commit

Permalink
User is not found when is searched by name and one of surnames nextcl…
Browse files Browse the repository at this point in the history
  • Loading branch information
Flávio Gomes da Silva Lisboa committed Dec 14, 2017
1 parent 1f10897 commit 58213e1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion apps/user_ldap/lib/Access.php
Original file line number Diff line number Diff line change
Expand Up @@ -1460,12 +1460,17 @@ private function prepareSearchTerm($term) {
$config = \OC::$server->getConfig();

$allowEnum = $config->getAppValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes');
$allowMedialSearches = $config->getSystemValue('user_ldap.enable_medial_search', false);

$result = $term;
if ($term === '') {
$result = '*';
} else if ($allowEnum !== 'no') {
$result = $term . '*';
if ($allowMedialSearches) {
$result = '*' . $term . '*';
} else {
$result = $term . '*';
}
}
return $result;
}
Expand Down

0 comments on commit 58213e1

Please sign in to comment.