private void populateResponseFields(DataForm form, List<String> accounts) {
        FormField jidField = form.addField();
        jidField.setType(FormField.Type.jid_multi);
        jidField.setVariable("accountjids");

        FormField emailField = form.addField();
        emailField.setType(FormField.Type.text_multi);
        emailField.setVariable("email");

        FormField nameField = form.addField();
        nameField.setType(FormField.Type.text_multi);
        nameField.setVariable("name");

        UserManager manager = UserManager.getInstance();
        for(String account : accounts) {
            User user;
            try {
                JID jid = new JID(account);
                user = manager.getUser(jid.getNode());
            }
            catch (Exception ex) {
                continue;
            }

            jidField.addValue(account);
            emailField.addValue(Objects.requireNonNullElse(user.getEmail(), ""));
            nameField.addValue(user.getName());
        }
    }
An adhoc command to retrieve the properties of the user.

@author Alexander Wenckus
xmppserver/src/main/java/org/jivesoftware/openfire/commands/admin/user/UserProperties.java