From 60b0f1f9ef99c6326020eddffa63f1eb3a917739 Mon Sep 17 00:00:00 2001 From: creme332 <65414576+creme332@users.noreply.github.com> Date: Wed, 22 May 2024 13:31:45 +0400 Subject: [PATCH] add phpdoc getSignedInClient --- src/core/Controller.php | 5 +++++ 1 file changed, 5 insertions(+) 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; }