throws Exception {
MessageBroker msgBroker = extractMessageBroker();
try {
// make a temp user to process the update in case of failure
User user = extractRequestContext().getUser();
User userUpdate = new User();
userUpdate.setKey(user.getKey());
userUpdate.setLocalID(user.getLocalID());
userUpdate.setDistinguishedName(user.getDistinguishedName());
userUpdate.setProfile(getActiveUserAttributes());
// execute the update,
// update the in memory profile for the active user
// set the success message and navigation outcome
IdentityAdapter idAdapter = context.newIdentityAdapter();
idAdapter.updateUserProfile(userUpdate);
user.setProfile(userUpdate.getProfile());
msgBroker.addSuccessMessage("catalog.identity.myProfile.success");
setNavigationOutcome(ResourceKeys.NAVIGATIONOUTCOME_HOME_DIRECT);
} catch (EmailPolicyException e) {
msgBroker.addErrorMessage("identity.profile.err.email");