mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
downgraded csv writer ver
This commit is contained in:
parent
77971a4eb5
commit
d7b32cfc3e
1 changed files with 5 additions and 3 deletions
|
|
@ -105,15 +105,17 @@ class CalcUsersStats extends Action
|
|||
|
||||
/** Get Team Name and Id */
|
||||
$teamId = $project->getAttribute('teamId', null);
|
||||
$teamName = null;
|
||||
if ($teamId) {
|
||||
$team = $dbForConsole->getDocument('teams', $teamId);
|
||||
$teamName = $team->getAttribute('name');
|
||||
}
|
||||
|
||||
$stats['Team ID'] = $team->getId() ?? 'N/A';
|
||||
$stats['Team name'] = $team->getAttribute('name', 'N/A');
|
||||
$stats['Team ID'] = $teamId;
|
||||
$stats['Team name'] = $teamName;
|
||||
|
||||
/** Get Total Users */
|
||||
$stats['users'] = $dbForProject->count('users', [], APP_LIMIT_COUNT);
|
||||
$stats['users'] = $dbForProject->count('users', []);
|
||||
|
||||
$csv->insertOne(array_values($stats));
|
||||
} catch (\Throwable $th) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue