if( query == null) return null;
// look for matching users:
String qs = (String) query;
log.debug("Looking for users that match " + qs );
// Get all users:
UserManager um = UserBean.getUserManager();
// Filter this into a list of matching users:
ArrayList<User> matches = new ArrayList<User>();
for( User u : um.getUsers() ) {
if( u.getUsername().startsWith(qs) ||
u.getFirstName().startsWith(qs) ||
u.getLastName().startsWith(qs) ) {
matches.add(u);
}