add condition fix problem when no client
This commit is contained in:
parent
32c026acfe
commit
f4c74db7df
1 changed files with 1 additions and 1 deletions
|
|
@ -13,7 +13,7 @@ return function ($page, $kirby, $site) {
|
||||||
"notifications" => Yaml::decode($kirby->user()->notifications()->value()),
|
"notifications" => Yaml::decode($kirby->user()->notifications()->value()),
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($kirby->user()->role() == 'client') {
|
if ($kirby->user()->role() == 'client' && $kirby->user()->client()->isNotEmpty()) {
|
||||||
$userData['client'] = [
|
$userData['client'] = [
|
||||||
"name" => (string) $kirby->user()->client()->toPage()->title(),
|
"name" => (string) $kirby->user()->client()->toPage()->title(),
|
||||||
"uuid" => (string) $kirby->user()->client()->toPage()->uuid()
|
"uuid" => (string) $kirby->user()->client()->toPage()->uuid()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue