Skip to content

Commit

Permalink
Merge branch 'lab/afbora/new-model-permissions' of https://github.com…
Browse files Browse the repository at this point in the history
…/getkirby/kirby into lab/afbora/new-model-permissions
  • Loading branch information
afbora committed Dec 12, 2024
2 parents f7aa00a + c1c32e1 commit aa222cc
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/Cms/Find.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ public static function user(string|null $id = null): User|null
return $user;
}

return $user ?? throw new NotFoundException(
key: 'user.undefined'
);
throw new NotFoundException([
'key' => 'user.undefined'
]);
}

// get a specific user by id
Expand All @@ -176,9 +176,11 @@ public static function user(string|null $id = null): User|null
return $user;
}

throw new NotFoundException(
key: 'user.notFound',
data: ['name' => $id]
);
throw new NotFoundException([
'key' => 'user.notFound',
'data' => [
'name' => $id
]
]);
}
}

0 comments on commit aa222cc

Please sign in to comment.