mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
ACS-895 - User email should not be necessary for joining a site (#387)
This behaviour has been inconsistent anyway: It failed and prevented the user from being added to the site if there was no email address. But it proceeded if the email could not be sent for other reasons, like an invalid server name or non existing account on that server.
This commit is contained in:
@@ -1997,17 +1997,29 @@ public class InvitationServiceImpl implements InvitationService, NodeServicePoli
|
||||
|
||||
private void sendInviteEmail(InviteSender inviteSender, List<String> invitePropNames, String inviteId, String emailTemplateXpath, String emailSubjectKey, Map<String, Object> executionVariables)
|
||||
{
|
||||
if (isSendEmails())
|
||||
// Do nothing if emails disabled.
|
||||
if (isSendEmails() == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// send email to the invitee if possible - but don't fail the invitation if email cannot be sent
|
||||
try
|
||||
{
|
||||
Map<String, String> properties = makePropertiesFromContextVariables(executionVariables, invitePropNames);
|
||||
|
||||
String packageRef = getPackageRef(executionVariables);
|
||||
properties.put(InviteNominatedSender.WF_PACKAGE, packageRef);
|
||||
|
||||
|
||||
properties.put(InviteNominatedSender.WF_INSTANCE_ID, inviteId);
|
||||
|
||||
|
||||
inviteSender.sendMail(emailTemplateXpath, emailSubjectKey, properties);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// Swallow exception
|
||||
logger.error("unable to send invite email", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user