<?php
require_auth();
require_permission('users.view');
$s = db()->query('SELECT a.*, u.name AS user_name FROM activity_log a LEFT JOIN users u ON u.id=a.user_id ORDER BY a.id DESC LIMIT 200');
json_ok($s->fetchAll());
