Feature Wiki

Information about planned and released features

Tabs

Mail: Make saluation configurable

1 Initial Problem

At the time being the salutation used in system mails is hard coded in `\ilMail::getSalutation`.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$lang = ($a_language instanceof ilLanguage) ? $a_language : $DIC->language();
$lang->loadLanguageModule('mail');
 
$gender = ilObjUser::_lookupGender($a_usr_id);
$gender = $gender ?: 'n';
$name = ilObjUser::_lookupName($a_usr_id);
 
if ($name['firstname'] === '') {
return $lang->txt('mail_salutation_anonymous') . ',';
}
 
return
$lang->txt('mail_salutation_' . $gender) . ' ' .
($name['title'] ? $name['title'] . ' ' : '') .
($name['firstname'] ? $name['firstname'] . ' ' : '') .
$name['lastname'] . ',';

This can be problematic if users have no control over the data (especially the "title"), which is often the case when external authentication services (like LDAP, SAML etc.) are used. The composed salutation itself respects the gender/address attribute of the user, but the mail system cannot guarantee the "title" attribute is used in a gender-neutral-way. There might be cases where external systems import strings like the German "Mitarbeiter" or "Professor".

2 Conceptual Summary

Therefore we suggest do make the salutation configurable in a way, where an institution can configure the composition of a saluation globally as a default. Furthermore, users should be able to optionally (if enabled globally) this settings in their user specific settings.

As a first option we propose to enhance the global mail presentation, so that administrators can configure the salutation by composing a list of placeholders (see: Use Mustache in Mail Template Configuration). Administrators must be able to decide, if users can change this global definition in their public profile/settings. If allowed, a users must be able to compose the salutation similar to the global administration.

The superior approach might be a global definition in the user component, so not only the mail component can take advantage of a salutation definition, but (beside the user component it self) other dependend components.

Independently of the actual location for this definition, a salutation might be composed based on the following placeholders:

  1. {GREETING}
  2. {TITLE}
  3. {FIRSTNAME}
  4. {LASTNAME] 

Rules:

  • The {GREETING} placeholder MUST be used. When interpolating the placeholder the user's "gender" is taken into consideration.
  • The {TITLE} placeholder COULD be used
  • Either the {FIRSTNAME} or {LASTNAME} placeholder MUST be used. 
  • The order can be chosen be defined (by the administrator, possibly overwritten be the specifc user).

3 User Interface Modifications

3.1 List of Affected Views

  • Administration / Communication / Mail
  • Communication / Mail / Mail Options

or: somewhere in the global user administration

3.2 User Interface Details

3.2.1 Administration / Communication / Mail

3.2.2 Communication / Mail / Mail Options

3.3 New User Interface Concepts

{ If the proposal introduces any completely new user interface elements, you might consult UI Kitchen Sink in order to find the necessary information to propose new UI-Concepts. Note that any maintainer might gladly assist you with this. }

3.4 Accessibility Implications

{ If the proposal contains potential accessibility issues that are neither covered by existing UI components nor clarified by guidelines, please list them here. For every potential issue please either propose a solution or write down a short risk assessment about potential fallout if there would be no solution for the issue. }

4 Technical Information

{ The maintainer has to provide necessary technical information, e.g. dependencies on other ILIAS components, necessary modifications in general services/architecture, potential security or performance issues. }

5 Privacy

{ Please list all personal data that will need to be stored or processed to implement this feature. For each date give a short explanation why it is necessary to use that date. }

6 Security

{ Does the feature include any special security relevant changes, e.g. the introducion of new endpoints or other new possible attack vectors. If yes, please explain these implications and include a commitment to deliver a written security concept as part of the feature development. This concept will need an additional approvement by the JourFixe. }

7 Contact

8 Funding

If you are interest in funding this feature, please add your name and institution to this list.

9 Discussion

10 Implementation

{ The maintainer has to give a description of the final implementation and add screenshots if possible. }

Test Cases

Test cases completed at {date} by {user}

  • {Test case number linked to Testrail} : {test case title}

Privacy

Information in privacy.md of component: updated on {date} by {user} | no change required

Approval

Approved at {date} by {user}.

Last edited: 26. Apr 2023, 16:06, Jansen, Michael [mjansen]