summaryrefslogtreecommitdiffstats
path: root/lib/private/Authentication
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2017-05-19 00:50:44 +0200
committerGitHub <noreply@github.com>2017-05-19 00:50:44 +0200
commit7976927628fba974570753759b9aaebb1faee413 (patch)
tree0c0b64e674795f21008c10c24d40e56953a2643f /lib/private/Authentication
parent8c624bdef9f3d7c2304ba4a3fba9dbbb23c65f3e (diff)
parent19a1e01d6cc08e486bb5afe83f25b2c28852603d (diff)
downloadnextcloud-server-7976927628fba974570753759b9aaebb1faee413.tar.gz
nextcloud-server-7976927628fba974570753759b9aaebb1faee413.zip
Merge pull request #4894 from nextcloud/generic-security-activities
Change 2FA activities to more generic security activities
Diffstat (limited to 'lib/private/Authentication')
-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']);
}
}