We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ba0986 commit 4cbc427Copy full SHA for 4cbc427
src/Panel/AuthPanel.php
@@ -5,6 +5,7 @@
5
use Cake\Core\InstanceConfigTrait;
6
use Cake\Event\EventInterface;
7
use DebugKit\DebugPanel;
8
+use Exception;
9
use TinyAuth\Auth\AclTrait;
10
use TinyAuth\Auth\AllowTrait;
11
use TinyAuth\Utility\Config;
@@ -83,7 +84,11 @@ public function shutdown(EventInterface $event): void {
83
84
$user = $authUserComponent->user();
85
$data['user'] = $user;
86
- $roles = $authUserComponent->roles();
87
+ try {
88
+ $roles = $authUserComponent->roles();
89
+ } catch (Exception) {
90
+ $roles = [];
91
+ }
92
$data['roles'] = $roles;
93
94
$access = [];
0 commit comments