diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2017-05-16 09:37:21 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-05-18 22:10:57 +0200 |
commit | 0928b5f621c42b2675fd877417e02dfc18b4e82b (patch) | |
tree | a4578de8557471c047f6017500cc1c0ffc797aca /lib | |
parent | 879e11e7d1d9802647ade392f4ae317952bc6f8f (diff) | |
download | nextcloud-server-0928b5f621c42b2675fd877417e02dfc18b4e82b.tar.gz nextcloud-server-0928b5f621c42b2675fd877417e02dfc18b4e82b.zip |
Change 2FA activities to more generic security activities
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Authentication/TwoFactorAuth/Manager.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/private/Authentication/TwoFactorAuth/Manager.php b/lib/private/Authentication/TwoFactorAuth/Manager.php index 1d0deada696..06aa0224ae0 100644 --- a/lib/private/Authentication/TwoFactorAuth/Manager.php +++ b/lib/private/Authentication/TwoFactorAuth/Manager.php @@ -23,6 +23,7 @@ namespace OC\Authentication\TwoFactorAuth; +use BadMethodCallException; use Exception; use OC; use OC\App\AppManager; @@ -218,16 +219,16 @@ class Manager { */ private function publishEvent(IUser $user, $event, array $params) { $activity = $this->activityManager->generateEvent(); - $activity->setApp('twofactor_generic') - ->setType('twofactor') + $activity->setApp('core') + ->setType('security') ->setAuthor($user->getUID()) ->setAffectedUser($user->getUID()) ->setSubject($event, $params); try { $this->activityManager->publish($activity); - } catch (Exception $e) { - $this->logger->warning('could not publish backup code creation activity', ['app' => 'twofactor_backupcodes']); - $this->logger->logException($e, ['app' => 'twofactor_backupcodes']); + } catch (BadMethodCallException $e) { + $this->logger->warning('could not publish backup code creation activity', ['app' => 'core']); + $this->logger->logException($e, ['app' => 'core']); } } |