@Override
    public Element updateVCard(String username, Element vCard) throws NotFoundException {
        // make sure some properties have not been overridden
        Element nickNameNode = vCard.element("NICKNAME");
        Element displayNameNode = vCard.element("FN");
        
        Element nameNode = vCard.element("N");
        Element lastNameNode = nameNode.element("FAMILY");
        Element firstnameNode = nameNode.element("GIVEN");
        
        Element emailNode = vCard.element("EMAIL").element("USERID");
        
        CrowdUserProvider userProvider = (CrowdUserProvider) UserManager.getUserProvider();
        try {
            User user = userProvider.getCrowdUser(username);
            
            nickNameNode.setText(username);
            displayNameNode.setText(user.displayName);
            lastNameNode.setText(user.lastName);
            firstnameNode.setText(user.firstName);
            emailNode.setText(user.email);
            
        } catch (UserNotFoundException unfe) {
            LOG.error("Unable to find user:" + username + " for updating its vcard", unfe);
        }

        LOG.debug("updatevcard: {}", vCard.asXML());

        return super.updateVCard(username, vCard);
    }
@see org.jivesoftware.openfire.vcard.DefaultVCardProvider#updateVCard(java.lang.String, org.dom4j.Element)
xmppserver/src/main/java/org/jivesoftware/openfire/crowd/CrowdVCardProvider.java