/* Only attempt to re-encrypt user attributes if users key is loaded */
if ("automatic".equals(Property.getProperty(new SystemConfigKey("security.privateKeyMode")))) {
if(PublicKeyStore.getInstance().hasLoadedKey(user.getPrincipalName())) {
PublicKeyStore.getInstance().removeKeys(user.getPrincipalName());
PublicKeyStore.getInstance().verifyPrivateKey(user.getPrincipalName(), setPasswordForm.getNewPassword().toCharArray());
for(Iterator i = confidentialAttributes.keySet().iterator(); i.hasNext(); ) {
String n = (String)i.next();
AttributeDefinition attrDef = (AttributeDefinition) userAttributes.getDefinition(n);
if (attrDef.getVisibility() == AttributeDefinition.USER_CONFIDENTIAL_ATTRIBUTE) {
Property.setProperty(new UserAttributeKey(user, n),
confidentialAttributes.getProperty(n),