role/audit: Show a message if no suggestions are found

This commit is contained in:
Johannes Meyer 2021-04-07 16:03:05 +02:00
parent 54acd6b4c8
commit 8e2ae13885
1 changed files with 4 additions and 0 deletions

View File

@ -331,6 +331,10 @@ class RoleController extends AuthBackendController
$limit -= count($names);
}
if (empty($suggestions)) {
$suggestions[] = [t('Your search does not match any user or group'), []];
}
$this->document->add(SingleValueSearchControl::createSuggestions($suggestions));
}