Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Bypass Login Security


daver6

Recommended Posts

I've got one site working OK, but I'm trying to use a subset of osCommerce on another site. My project uses a login to take a registered customer to an area that I don't want seen by the general public.

 

I've got it working fine, with one major exception. I can bypass the login screen and merely enter the index.php address. This does give me the welcome "Guest" message, but then I can still go anywhere on the "restricted" area.

 

While it's not an ideal solution, I've tried adding the following code that I found in another forum area

 if the customer is not logged on, redirect them to the login page

if (!tep_session_is_registered('customer_id')) {

 $navigation->set_snapshot();

 tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));

}

in the index.php file. However, it gives me an error that the tep_session_is_registered is unrecognized.

 

What is the tep_session? How can I fix the error condition and/or properly redirect an unregistered person away from the index page?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...