String lastName = request.getAttribute("lastName");
if ( ! isBlank(lastName) ) {
attrs.put("lastName", lastName);
}
TsukubaGAMARegistryResult result = null;
try {
result = gamaClient.addUser(username, password, subject, attrs);
} catch (Exception e) {
log.error(e.getMessage(), e);
throw new AccountActivationException(e);
}
addNewMemberToVOMRS(request, result);
request.removeAttribute("predictedSubject");
request.setAttribute("subject", result.getIssuedCertificateSubject());
request.setExpireDate( result.getExpireDate() );
request.changeStatus(AccountRequest.Status.ACTIVATED);
request.appendAdminComments("Account activated.");
}