koollayed Posted October 16, 2010 Posted October 16, 2010 I have a question Oscommerce. I have a page I want to protect. I added the code if (!tep_session_is_registered('customer_id')) { $navigation->set_snapshot(); tep_redirect(tep_href_link(FILENAME_LOGIN1, '', 'SSL')); } I have two login boxes. login.php is for regular logins to the site and login1.php is for protected content that checks to see if you are allowed to access a page. The issue I have with this code is I do not have sessions in the url of my site. So if a customer that I don't want to have the link has the link they can login to login.php as themselves and click on the link and access the page without being redirected to login1 to verify themselves. Questions Hope this is not too confusing. How can I stop logged users from accessing the site and force them to login1 without using sessions?
ecartsolutions Posted October 21, 2010 Posted October 21, 2010 Hi Seems like you need a customer group add on to get things moving. You can install the addon and then tweak them. Or take the simpler way. Add a additional flag, and set the flag during login. check the flag ( not the session ), when checking for access to the "certain" pages. cheers Shiva Our truest life is when we are in dreams awake. -- Henry David Thoreau --
koollayed Posted October 21, 2010 Author Posted October 21, 2010 Hi Seems like you need a customer group add on to get things moving. You can install the addon and then tweak them. Or take the simpler way. Add a additional flag, and set the flag during login. check the flag ( not the session ), when checking for access to the "certain" pages. cheers Shiva Thanks I tried checking a new member_flag2. I'm not sure if I'm coding it correctly. I have changed customer_id to member_flag2 and all different ways any help would be appreciated.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.