big restructure

This commit is contained in:
2026-02-11 19:28:12 +01:00
parent cd59ccd99b
commit 3eb9cc0ac4
209 changed files with 5101 additions and 2459 deletions

View File

@@ -1,9 +1,9 @@
<?php
use MintyPHP\Router;
use MintyPHP\Service\UserService;
use MintyPHP\Service\UserAvatarService;
use MintyPHP\Service\TenantScopeService;
use MintyPHP\Service\User\UserService;
use MintyPHP\Service\User\UserAvatarService;
use MintyPHP\Service\Tenant\TenantScopeService;
if (!isset($_SESSION['user'])) {
http_response_code(401);
@@ -24,6 +24,7 @@ $tenant = trim((string) ($_GET['tenant'] ?? ''));
$roles = $_GET['roles'] ?? '';
$departments = $_GET['departments'] ?? '';
$emailVerified = $_GET['email_verified'] ?? 'all';
$loginStatus = $_GET['login_status'] ?? 'all';
$result = UserService::listPaged([
'limit' => $limit,
@@ -38,6 +39,7 @@ $result = UserService::listPaged([
'roles' => $roles,
'departments' => $departments,
'email_verified' => $emailVerified,
'login_status' => $loginStatus,
'tenantUserId' => $currentUserId,
]);
@@ -95,6 +97,7 @@ foreach ($result['rows'] as $row) {
'roles' => $roleList,
'created' => dt($row['created'] ?? ''),
'modified' => dt($row['modified'] ?? ''),
'last_login' => dt($row['last_login_at'] ?? ''),
'active' => (int) ($row['active'] ?? 0),
'has_avatar' => $uuid !== '' && UserAvatarService::hasAvatar($uuid),
];