if (isset($_SESSION['isMultiEntitiesMode']) && $_SESSION['isMultiEntitiesMode'] == true) { // User is in multi-entity mode // Enable specific functionality here } else { // User is not in multi-entity mode // Disable specific functionality here }The package library for this functionality may depend on the specific application being developed. However, PHP itself provides built-in session management functions that can be used to implement this feature.