Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
susnux committed Oct 23, 2023
1 parent 5e99c08 commit b4f62ca
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/private/App/AppManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,7 @@ public function getDefaultAppForUser(?IUser $user = null, bool $withFallbacks =

$user ??= $this->userSession->getUser();

$this->logger->warning('grepme', ['user' => $user, 'apps' => $defaultApps]);
if ($user !== null) {
$userDefaultApps = explode(',', $this->config->getUserValue($user->getUID(), 'core', 'defaultapp'));
$defaultApps = array_filter(array_merge($userDefaultApps, $defaultApps));
Expand All @@ -848,10 +849,12 @@ public function getDefaultAppForUser(?IUser $user = null, bool $withFallbacks =
if (empty($defaultApps) && $withFallbacks) {
$defaultApps = ['dashboard','files'];
}
$this->logger->warning('grepme', ['user' => $user, 'apps' => $defaultApps]);

// Find the first app that is enabled for the current user
foreach ($defaultApps as $defaultApp) {
$defaultApp = \OC_App::cleanAppId(strip_tags($defaultApp));
$this->logger->warning('grepme', ['app' => $defaultApp, 'enabled' => $this->isEnabledForUser($defaultApp, $user)]);
if ($this->isEnabledForUser($defaultApp, $user)) {
$appId = $defaultApp;
break;
Expand Down

0 comments on commit b4f62ca

Please sign in to comment.