Zen Cart Logo
Forums / General Questions / Authorization...is there a way to allow access even when Authorization = 1

Authorization...is there a way to allow access even when Authorization = 1

Views: 1,081

Results 1 to 3 of 3
27 Apr 2012, 3:33 PM
#1
deadeye avatar

deadeye

Zen Follower

Join Date:
Jul 2005
Posts:
109
Plugin Contributions:
0

Authorization...is there a way to allow access even when Authorization = 1

Configuration->Customer Details->Customer Approval Status - Authorization Pending = 1

Is there an easy way to still allow access to /catalog/index.php?main_page=conditions ?

I'm going to look in the code now because access is still allowed to 'Contact Us' and 'Privacy', so I realize there must be some code somewhere...wasn't sure if there was someone that new off-hand though.

Normally the behavior is for most links to redirect to the 'Login' page.

Thanks!

27 Apr 2012, 3:37 PM
#2
deadeye avatar

deadeye

Zen Follower

Join Date:
Jul 2005
Posts:
109
Plugin Contributions:
0

Re: Authorization...is there a way to allow access even when Authorization = 1

Looks like I found it already...didn't expect to that fast. init_customer_auth.php I believe...unless someone can tell me otherwise. Thanks!

27 Apr 2012, 3:59 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Authorization...is there a way to allow access even when Authorization = 1

This case is what you need to change by adding the code in RED:

  case (CUSTOMERS_APPROVAL_AUTHORIZATION == '1' and $_SESSION['customers_authorization'] != '0'):
  /**
   * customer is pending approval
   * customer must be logged in to browse
   */
  if (!in_array($_GET['main_page'], array(FILENAME_LOGIN, FILENAME_LOGOFF, FILENAME_CONTACT_US, FILENAME_PRIVACY, FILENAME_CONDITIONS))) {
  if ($_GET['main_page'] != CUSTOMERS_AUTHORIZATION_FILENAME) {
    zen_redirect(zen_href_link(CUSTOMERS_AUTHORIZATION_FILENAME));
    }
  }
  break;