diff options
Diffstat (limited to 'apps/dav/lib/CalDAV/Reminder')
-rw-r--r-- | apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php | 2 | ||||
-rw-r--r-- | apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php | 11 |
2 files changed, 2 insertions, 11 deletions
diff --git a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php index 5a6591fb749..d694b249e96 100644 --- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php +++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/AbstractProvider.php @@ -54,7 +54,7 @@ abstract class AbstractProvider implements INotificationProvider { protected $logger; /** @var L10NFactory */ - private $l10nFactory; + protected $l10nFactory; /** @var IL10N[] */ private $l10ns; diff --git a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php index 4152e02dc8d..90a86230ec3 100644 --- a/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php +++ b/apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php @@ -35,7 +35,6 @@ use OCP\IConfig; use OCP\IL10N; use OCP\ILogger; use OCP\IURLGenerator; -use OCP\IUser; use OCP\L10N\IFactory as L10NFactory; use OCP\Mail\IEMailTemplate; use OCP\Mail\IMailer; @@ -349,7 +348,7 @@ class EmailProvider extends AbstractProvider { foreach ($users as $user) { $emailAddress = $user->getEMailAddress(); if ($emailAddress) { - $lang = $this->getLangForUser($user); + $lang = $this->l10nFactory->getUserLanguage($user); if ($lang) { $emailAddresses[$emailAddress] = [ 'LANG' => $lang, @@ -364,14 +363,6 @@ class EmailProvider extends AbstractProvider { } /** - * @param IUser $user - * @return string - */ - private function getLangForUser(IUser $user): ?string { - return $this->config->getUserValue($user->getUID(), 'core', 'lang', null); - } - - /** * @param IL10N $l10n * @param VEvent $vevent * @return string |