use OCA\Settings\Activity\Provider;
use OCP\Activity\IManager as IActivityManager;
+use OCP\Defaults;
use OCP\IConfig;
use OCP\IGroupManager;
use OCP\IURLGenerator;
protected $config;
/** @var IFactory */
protected $languageFactory;
+ /** @var Defaults */
+ protected $defaults;
public function __construct(IActivityManager $activityManager,
IGroupManager $groupManager,
IURLGenerator $urlGenerator,
IMailer $mailer,
IConfig $config,
- IFactory $languageFactory) {
+ IFactory $languageFactory,
+ Defaults $defaults) {
$this->activityManager = $activityManager;
$this->groupManager = $groupManager;
$this->userManager = $userManager;
$this->mailer = $mailer;
$this->config = $config;
$this->languageFactory = $languageFactory;
+ $this->defaults = $defaults;
}
/**
->setType('personal_settings')
->setAffectedUser($user->getUID());
+ $instanceName = $this->defaults->getName();
$instanceUrl = $this->urlGenerator->getAbsoluteURL('/');
$language = $this->languageFactory->getUserLanguage($user);
$l = $this->languageFactory->get('settings', $language);
'instanceUrl' => $instanceUrl,
]);
- $template->setSubject($l->t('Password for %1$s changed on %2$s', [$user->getDisplayName(), $instanceUrl]));
+ $template->setSubject($l->t('Password for %1$s changed on %2$s', [$user->getDisplayName(), $instanceName]));
$template->addHeader();
$template->addHeading($l->t('Password changed for %s', [$user->getDisplayName()]), false);
$template->addBodyText($text . ' ' . $l->t('If you did not request this, please contact an administrator.'));