use Delight\Auth\Auth; $auth = new Auth($db); $currentProject = $auth->getCurrentProject();
use Delight\Auth\Auth; $auth = new Auth($db); if ($auth->isLoggedIn()) { $currentProject = $auth->getCurrentProject(); } else { // Redirect to login page }This example shows how to use getCurrentProject function after checking if a user is logged in. If the user is not logged in, the code redirects the user to the login page. Overall, getCurrentProject function belongs to the Delight\Auth library, which is a lightweight and flexible package for user authentication and management in PHP applications.