summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2017-05-16 09:37:21 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2017-05-18 22:10:57 +0200
commit0928b5f621c42b2675fd877417e02dfc18b4e82b (patch)
treea4578de8557471c047f6017500cc1c0ffc797aca /lib
parent879e11e7d1d9802647ade392f4ae317952bc6f8f (diff)
downloadnextcloud-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.php11
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']);
}
}