summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib/Notification/Notifier.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/user_ldap/lib/Notification/Notifier.php')
-rw-r--r--apps/user_ldap/lib/Notification/Notifier.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/apps/user_ldap/lib/Notification/Notifier.php b/apps/user_ldap/lib/Notification/Notifier.php
index a6053cfcb19..0099d764f03 100644
--- a/apps/user_ldap/lib/Notification/Notifier.php
+++ b/apps/user_ldap/lib/Notification/Notifier.php
@@ -60,7 +60,19 @@ class Notifier implements INotifier {
switch ($notification->getSubject()) {
// Deal with known subjects
case 'pwd_exp_warn_days':
- $notification->setParsedSubject($l->t('Your password will expire within %s day(s).', $notification->getSubjectParameters()));
+ $params = $notification->getSubjectParameters();
+ $days = (int) $params[0];
+ if ($days === 2) {
+ $notification->setParsedSubject($l->t('Your password will expire tomorrow.', $days));
+ } else if ($days === 1) {
+ $notification->setParsedSubject($l->t('Your password will expire today.', $days));
+ } else {
+ $notification->setParsedSubject($l->n(
+ 'Your password will expire within %n day.',
+ 'Your password will expire within %n days.',
+ $days
+ ));
+ }
return $notification;
default: