/
[emails] Incomplete info in user membership expiration e-mails [5.3.0-B1]
[emails] Incomplete info in user membership expiration e-mails [5.3.0-B1]
The permission system in In-Portal is based around user groups. The permissions are assigned to the user groups and then user can be added to one or more groups. The user group membership can be:
- permanent
- time-based
The time-based group membership have fixed expiration date and:
- user & administrator will be notified ("
USER.MEMBERSHIP.EXPIRATION.NOTICE
" e-mail template) X days (configurable) ahead, when their membership is about to expire - user & administrator will be notified ("
USER.MEMBERSHIP.EXPIRED
" e-mail template), when their membership is expired
There are few problems with these e-mails:
- the user information is missing
- the "
u
" prefix, that is hardcoded in the e-mail template doesn't match one passed from code, that sends these e-mails
Solution
- replace the "
<inp2:u_
" in the subject and body of both e-mails with "<inp2:
" (to use externally provided prefix) - from the "
u:OnCheckExpiredMembership
" event ("membership_expiration
" scheduled task) load the user object (for user, whose membership is affected) before sending the actual e-mail