diff options
Diffstat (limited to 'apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php')
-rw-r--r-- | apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php | 11 |
1 files changed, 1 insertions, 10 deletions
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 |