import frappe @frappe.whitelist(allow_guest=True) def isUserLoggedIn(): is_subscribed = False if frappe.session.user == "Guest": is_subscribed = is_subscribed return is_subscribed else: return True