}
}
protected void aroundCreateAccount(InvocationContext ctx) {
if (ctx.getMethod().getName().equals("createAccount")) {
AccountDTO account = (AccountDTO) ctx.getParameters()[0];
if (isSendEmailOnCreateAccount()) {
LOGGER.debug("demande d'envoi de mail :" + account);
Map<String, Object> properties = new HashMap<String, Object>();
properties.put("account", account);
if (account.getEmail() == null) {
LOGGER.error("Can not send email confirmation; for user {}", account.getUsername());
} else {
mailEJB.sendEmailWithTemplate(account.getEmail(), Constante.SEND_EMAIL_ACCOUNT_CREATION, properties);
}
}
}
}