diff options
author | Joas Schilling <coding@schilljs.com> | 2020-06-23 08:45:01 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-07-03 10:59:43 +0200 |
commit | db8267db26e2e81ef4a39b424c5a8ea7bc124bfd (patch) | |
tree | 0d63e8dd40150166639f84083bfaf37cd9c52077 /apps/dav/lib/CalDAV/Reminder | |
parent | b997edad105d38703351b89998444ab0828f7d05 (diff) | |
download | nextcloud-server-db8267db26e2e81ef4a39b424c5a8ea7bc124bfd.tar.gz nextcloud-server-db8267db26e2e81ef4a39b424c5a8ea7bc124bfd.zip |
Use the new method everywhere
Signed-off-by: Joas Schilling <coding@schilljs.com>
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 |