// TODO: Add Account Activating feature
UIApplication uiApp = context.getUIApplication();
uiApp.addMessage(new ApplicationMessage("UIRegisterForm.registerWithSuccess.message", null));
// Send mail to administrator after successful registration of user
PostRegistrationService postRegistrationService = uiApp.getApplicationComponent(PostRegistrationService.class);
User user = (User) context.getAttribute(ATTR_USER);
postRegistrationService.sendMailAfterSuccessfulRegistration(user);
}
// Invalidate the capcha
if (context instanceof PortletRequestContext) {
PortletRequestContext prc = (PortletRequestContext) context;