- model.add(new UuidAndTitleCache<User>(User.class, user.getUuid(),String.format("%s, %s", user.getUsername(), user.getPerson())));
+ if (pattern == null || user.getUsername().matches(pattern + ".*")) {
+ model.add(new UuidAndTitleCache<User>(User.class, user.getUuid(), user.getId(), String.format("%s, %s", user.getUsername(), user.getPerson())));
+ }