add additional check

This commit is contained in:
Damodar Lohani
2025-10-16 02:29:30 +00:00
parent 2df621f9c5
commit 22136867ed
+6 -4
View File
@@ -305,10 +305,12 @@ App::setResource('user', function (string $mode, Document $project, Document $co
if ($project->isEmpty()) {
$user = new Document([]);
} else {
if ($project->getId() === 'console') {
$user = $dbForPlatform->getDocument('users', $store->getProperty('id', ''));
} else {
$user = $dbForProject->getDocument('users', $store->getProperty('id', ''));
if (!empty($store->getProperty('id', ''))) {
if ($project->getId() === 'console') {
$user = $dbForPlatform->getDocument('users', $store->getProperty('id', ''));
} else {
$user = $dbForProject->getDocument('users', $store->getProperty('id', ''));
}
}
}
}