Skip to content
Snippets Groups Projects
Commit 7b740682 authored by srosse's avatar srosse
Browse files

OO-993: fix RS in the user delete workflow if the "copy the sender" is selected

parent 78728cb0
No related branches found
No related tags found
No related merge requests found
...@@ -199,9 +199,9 @@ public class SelectionController extends BasicController { ...@@ -199,9 +199,9 @@ public class SelectionController extends BasicController {
} }
private void handleEmailButtonEvent(UserRequest ureq, TableMultiSelectEvent tmse) { private void handleEmailButtonEvent(UserRequest ureq, TableMultiSelectEvent tmse) {
if (tdm.getObjects(tmse.getSelection()).size() != 0) { List<Identity> identities = tdm.getObjects(tmse.getSelection());
selectedIdentities = tdm.getObjects(tmse.getSelection()); if (identities.size() > 0) {
selectedIdentities = identities;
MailTemplate deleteMailTemplate = createMailTemplate(translate(KEY_EMAIL_SUBJECT), translate(KEY_EMAIL_BODY)); MailTemplate deleteMailTemplate = createMailTemplate(translate(KEY_EMAIL_SUBJECT), translate(KEY_EMAIL_BODY));
deleteMailTemplate.addToContext("lastloginduration", Integer.toString(UserDeletionManager.getInstance().getLastLoginDuration() )); deleteMailTemplate.addToContext("lastloginduration", Integer.toString(UserDeletionManager.getInstance().getLastLoginDuration() ));
deleteMailTemplate.addToContext("durationdeleteemail", Integer.toString(UserDeletionManager.getInstance().getDeleteEmailDuration() )); deleteMailTemplate.addToContext("durationdeleteemail", Integer.toString(UserDeletionManager.getInstance().getDeleteEmailDuration() ));
......
...@@ -154,7 +154,6 @@ public class UserDeletionManager extends BasicManager { ...@@ -154,7 +154,6 @@ public class UserDeletionManager extends BasicManager {
} }
template.putVariablesInMailContext(template.getContext(), identity); template.putVariablesInMailContext(template.getContext(), identity);
logDebug(" Try to send Delete-email to identity=" + identity.getName() + " with email=" + identity.getUser().getProperty(UserConstants.EMAIL, null)); logDebug(" Try to send Delete-email to identity=" + identity.getName() + " with email=" + identity.getUser().getProperty(UserConstants.EMAIL, null));
Identity ccIdentity = null;
MailerResult result = new MailerResult(); MailerResult result = new MailerResult();
MailBundle bundle = mailManager.makeMailBundle(null, identity, template, sender, null, result); MailBundle bundle = mailManager.makeMailBundle(null, identity, template, sender, null, result);
...@@ -162,7 +161,7 @@ public class UserDeletionManager extends BasicManager { ...@@ -162,7 +161,7 @@ public class UserDeletionManager extends BasicManager {
mailManager.sendMessage(bundle); mailManager.sendMessage(bundle);
} }
if(template.getCpfrom()) { if(template.getCpfrom()) {
MailBundle ccBundle = mailManager.makeMailBundle(null, ccIdentity, template, sender, null, result); MailBundle ccBundle = mailManager.makeMailBundle(null, sender, template, sender, null, result);
if(ccBundle != null) { if(ccBundle != null) {
mailManager.sendMessage(ccBundle); mailManager.sendMessage(ccBundle);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment