summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-08-22 08:50:34 +0200
committerGitHub <noreply@github.com>2018-08-22 08:50:34 +0200
commita4e989bb75adf7f474d3228850589601650f51bb (patch)
tree6cea26e9cea9f05ad9a2c920ac377cbc1df1bb2b /settings
parentff3b13238232238eefd9d03bb0b744515bebe133 (diff)
parentbd31fe7c9b08bd369371f1f00cf32c54e7df9175 (diff)
downloadnextcloud-server-a4e989bb75adf7f474d3228850589601650f51bb.tar.gz
nextcloud-server-a4e989bb75adf7f474d3228850589601650f51bb.zip
Merge pull request #10763 from nextcloud/backport/10687/stable13
[stable13] don't blame randome people for background email updates
Diffstat (limited to 'settings')
-rw-r--r--settings/Hooks.php13
1 files changed, 5 insertions, 8 deletions
diff --git a/settings/Hooks.php b/settings/Hooks.php
index 097d708a36a..f2b9e4fd086 100644
--- a/settings/Hooks.php
+++ b/settings/Hooks.php
@@ -165,6 +165,7 @@ class Hooks {
$actor = $this->userSession->getUser();
if ($actor instanceof IUser) {
+ $subject = Provider::EMAIL_CHANGED_SELF;
if ($actor->getUID() !== $user->getUID()) {
$this->l = $this->languageFactory->get(
'settings',
@@ -173,15 +174,11 @@ class Hooks {
$this->config->getSystemValue('default_language', 'en')
)
);
-
- $text = $this->l->t('%1$s changed your email address on %2$s.', [$actor->getDisplayName(), $instanceUrl]);
- $event->setAuthor($actor->getUID())
- ->setSubject(Provider::EMAIL_CHANGED_BY, [$actor->getUID()]);
- } else {
- $text = $this->l->t('Your email address on %s was changed.', [$instanceUrl]);
- $event->setAuthor($actor->getUID())
- ->setSubject(Provider::EMAIL_CHANGED_SELF);
+ $subject = Provider::EMAIL_CHANGED;
}
+ $text = $this->l->t('Your email address on %s was changed.', [$instanceUrl]);
+ $event->setAuthor($actor->getUID())
+ ->setSubject($subject);
} else {
$text = $this->l->t('Your email address on %s was changed by an administrator.', [$instanceUrl]);
$event->setSubject(Provider::EMAIL_CHANGED);