ChrisColeman Posted September 6, 2021 Share Posted September 6, 2021 Hi CubeCart People, hopefully simple question .. I'm changing the contact form on a site so user has to be logged-in to use it - this because a lobotomized BOT has gotten hold of the form and is sending just a few unsavory messages every day to site-admin. Well we don't see it as a big deal to force users to login before using the contact form, but how do I determine if a user is logged in (or not), or to put it another way if a login session is active ? For your info I will use hook: class.cubecart.contact to send different content when the user is not logged in. Thanks and Regards, ChrisColeman. Link to comment Share on other sites More sharing options...
ChrisColeman Posted September 6, 2021 Author Share Posted September 6, 2021 Ok got it - // Can use 1 or 0 as boolean in smarty .. !empty($GLOBALS['session']->session_data["customer_id"])?1:0; Thanks (me), Chris. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.