Check if class UserToken exists

This commit is contained in:
jf-cbd
2026-06-10 15:34:49 +02:00
parent 697e3db497
commit ba54cae217
2 changed files with 14 additions and 8 deletions

View File

@@ -159,8 +159,11 @@ class ITopUserCountingRepository
/**
* @throws Exception
*/
public function GetApplicationUsers(bool $bAllData = true): array
public function GetApplicationUsers(bool $bAllData = true): ?array
{
if (!MetaModel::IsValidClass('UserToken')) {
return null;
}
$sOQLApplicationUser = 'SELECT UserToken';
try {
$oFilter = $bAllData ? DBObjectSearch::FromOQL_AllData($sOQLApplicationUser) : DBObjectSearch::FromOQL($sOQLApplicationUser);