Skip to content
Snippets Groups Projects
Commit 818841d1 authored by srosse's avatar srosse
Browse files

OO-2740: remove the email of the person leaving the group from the email to...

OO-2740: remove the email of the person leaving the group from the email to the person gaining access to it (patch S. Clemenz)
parent 708356fc
No related branches found
No related tags found
No related merge requests found
...@@ -1475,7 +1475,7 @@ public class BusinessGroupServiceImpl implements BusinessGroupService, UserDataD ...@@ -1475,7 +1475,7 @@ public class BusinessGroupServiceImpl implements BusinessGroupService, UserDataD
mailing = new MailPackage(true); mailing = new MailPackage(true);
} }
BusinessGroupMailing.sendEmail(ureqIdentity, firstWaitingListIdentity, group, MailType.graduateFromWaitingListToParticpant, mailing); BusinessGroupMailing.sendEmail(null, firstWaitingListIdentity, group, MailType.graduateFromWaitingListToParticpant, mailing);
counter++; counter++;
} }
} }
......
...@@ -192,13 +192,18 @@ public class BGMailHelper { ...@@ -192,13 +192,18 @@ public class BGMailHelper {
*/ */
private static MailTemplate createMailTemplate(BusinessGroupShort group, Identity actor, String subjectKey, String bodyKey) { private static MailTemplate createMailTemplate(BusinessGroupShort group, Identity actor, String subjectKey, String bodyKey) {
// get some data about the actor and fetch the translated subject / body via i18n module // get some data about the actor and fetch the translated subject / body via i18n module
String[] bodyArgs = new String[] { String[] bodyArgs = null;
actor.getUser().getProperty(UserConstants.FIRSTNAME, null), String lang = null;
actor.getUser().getProperty(UserConstants.LASTNAME, null), if (actor != null) {
actor.getUser().getProperty(UserConstants.EMAIL, null), bodyArgs = new String[] {
actor.getUser().getProperty(UserConstants.EMAIL, null)// 2x for compatibility with old i18m properties actor.getUser().getProperty(UserConstants.FIRSTNAME, null),
}; actor.getUser().getProperty(UserConstants.LASTNAME, null),
Locale locale = I18nManager.getInstance().getLocaleOrDefault(actor.getUser().getPreferences().getLanguage()); actor.getUser().getProperty(UserConstants.EMAIL, null),
actor.getUser().getProperty(UserConstants.EMAIL, null)// 2x for compatibility with old i18m properties
};
lang = actor.getUser().getPreferences().getLanguage();
}
Locale locale = I18nManager.getInstance().getLocaleOrDefault(lang);
Translator trans = Util.createPackageTranslator(BGMailHelper.class, locale, Translator trans = Util.createPackageTranslator(BGMailHelper.class, locale,
Util.createPackageTranslator(BusinessGroupListController.class, locale)); Util.createPackageTranslator(BusinessGroupListController.class, locale));
String subject = trans.translate(subjectKey); String subject = trans.translate(subjectKey);
......
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