diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2018-08-14 17:06:57 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2018-08-14 17:25:46 +0200 |
commit | 6f24865bf8a55975778acca5e2610fda51deca35 (patch) | |
tree | 90a3280db4a542d3f5b12f2bc66292c1ae45f3e2 /settings/Hooks.php | |
parent | d05c815796152f0d76c459e893f154b3b78005aa (diff) | |
download | nextcloud-server-6f24865bf8a55975778acca5e2610fda51deca35.tar.gz nextcloud-server-6f24865bf8a55975778acca5e2610fda51deca35.zip |
don't blame email address changers
the information is being collected with admin_audit
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'settings/Hooks.php')
-rw-r--r-- | settings/Hooks.php | 13 |
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); |