From 0928b5f621c42b2675fd877417e02dfc18b4e82b Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Tue, 16 May 2017 09:37:21 +0200 Subject: Change 2FA activities to more generic security activities Signed-off-by: Christoph Wurst --- lib/private/Authentication/TwoFactorAuth/Manager.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lib/private') 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']); } } -- cgit v1.2.3