fix: smtp view

This commit is contained in:
Andras Bacsai
2023-09-15 11:28:44 +02:00
parent b07cc500e7
commit 019670d5d1
7 changed files with 59 additions and 65 deletions

View File

@@ -62,7 +62,11 @@ function showBoarding(): bool
function refreshSession(?Team $team = null): void
{
if (!$team) {
$team = User::find(auth()->user()->id)->teams->first();
if (auth()->user()->currentTeam()) {
$team = Team::find(auth()->user()->currentTeam()->id);
} else {
$team = User::find(auth()->user()->id)->teams->first();
}
}
Cache::forget('team:' . auth()->user()->id);
Cache::remember('team:' . auth()->user()->id, 3600, function() use ($team) {