userService.updateSecurityContext(updatedUser);
success = true;
if (isTempPassword) {
EventComposite composite = new UserPasswordResetComposite(password);
EventDeliveryWithComposite deliveryMechanism = eventDeliveryWithCompositeFactory.getEventDelivery(EventType.USER_PASSWORD_RESET);
if (deliveryMechanism != null) {
boolean notificationSent = deliveryMechanism.sendNotifications(updatedUser, composite);
if (!notificationSent) {
log.info(String.format("Password reset email not sent to: %s", updatedUser.getEmail()));