Skip to content

Commit

Permalink
Merge pull request #921 from biigle/patch-1
Browse files Browse the repository at this point in the history
Fix error with federated search user
  • Loading branch information
mzur authored Sep 6, 2024
2 parents ba0c5c3 + dac829f commit 5f6861a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Auth;
use Biigle\Announcement;
use Biigle\Support\FilesystemManager;
use Biigle\User;
use Illuminate\Pagination\Paginator;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\Facades\Storage;
Expand Down Expand Up @@ -38,7 +39,7 @@ public function boot(): void
// Make some variables available in any view.
$user = Auth::user();
$view->with('user', $user);
if ($user) {
if ($user instanceof User) {
$view->with('hasNotification', $user->unreadNotifications()->exists());
}
$view->with('announcement', Announcement::getActive());
Expand Down

0 comments on commit 5f6861a

Please sign in to comment.