summaryrefslogtreecommitdiffstats
path: root/apps/admin_audit
diff options
context:
space:
mode:
Diffstat (limited to 'apps/admin_audit')
-rw-r--r--apps/admin_audit/lib/actions/usermanagement.php17
-rw-r--r--apps/admin_audit/lib/auditlogger.php1
2 files changed, 18 insertions, 0 deletions
diff --git a/apps/admin_audit/lib/actions/usermanagement.php b/apps/admin_audit/lib/actions/usermanagement.php
index 925d8b0a715..0ee192d9a31 100644
--- a/apps/admin_audit/lib/actions/usermanagement.php
+++ b/apps/admin_audit/lib/actions/usermanagement.php
@@ -61,6 +61,23 @@ class UserManagement extends Action {
}
/**
+ * Log enabling of users
+ *
+ * @param array $params
+ */
+ public function change(array $params) {
+ if ($params['feature'] === 'enabled') {
+ $this->log(
+ $params['value'] === 'true' ? 'User enabled: "%s"' : 'User disabled: "%s"',
+ ['user' => $params['user']->getUID()],
+ [
+ 'user',
+ ]
+ );
+ }
+ }
+
+ /**
* Logs changing of the user scope
*
* @param IUser $user
diff --git a/apps/admin_audit/lib/auditlogger.php b/apps/admin_audit/lib/auditlogger.php
index a01fec63019..4e1909c6475 100644
--- a/apps/admin_audit/lib/auditlogger.php
+++ b/apps/admin_audit/lib/auditlogger.php
@@ -90,6 +90,7 @@ class AuditLogger {
Util::connectHook('OC_User', 'post_createUser', $userActions, 'create');
Util::connectHook('OC_User', 'post_deleteUser', $userActions, 'delete');
+ Util::connectHook('OC_User', 'changeUser', $userActions, 'change');
$this->userSession->listen('\OC\User', 'postSetPassword', [$userActions, 'setPassword']);
}