diff --git a/src/core/Controller.php b/src/core/Controller.php index a7cb3939..f3e0a550 100644 --- a/src/core/Controller.php +++ b/src/core/Controller.php @@ -38,8 +38,13 @@ private function getLibrariesTags(array $required_libraries): string return $script_str; } + /** + * @return Client|null Client account of currently logged-in user. Null if no one is logged in. + */ private function getSignedInClient(): ?Client { + // $_SESSION['user'] was set to the client email on login + // if it is empty, no one is logged in if (empty($_SESSION['user'])) { return null; }