NOTE: THIS ONLY APPLIES IF YOU'VE ENABLED THIS SETTING:
In your Admin->Configuration->Customer Details you've set Customer Approval Status - Authorization Pending to 1 (1 = Must be Authorized to Browse)
Symptoms:
- Possible symptom: visiting the site (or clicking "home") while not already logged in as an approved customer, the login page appears multiple times in the browser if the Authorization Pending setting is not set to 0
- Possible symptom: if using PayPal IPN then IPNs may not be getting processed if the Authorization Pending setting is not set to 0
- Possible symptom: any other scripts using the built-in ajax handler are not processing if the Authorization Pending setting is not set to 0
Easiest Fix:
1. If you don't need that Customer Approval option, then TURN IT OFF (set it to 0).
Code Fix:
2. But if you need the feature, you will need to make the following edits to /includes/init_includes/init_customer_auth.php, by adding the additional code as highlighted here:
Around line 55 you'll find a "switch" loop:
Code:
switch (true) {
/**
* bypass redirects for these scripts, to processing regardless of store mode or cust auth mode
*/
case (preg_match('|_handler\.php$|', $_SERVER['SCRIPT_NAME'])):
case (preg_match('|ajax\.php$|', $_SERVER['SCRIPT_NAME'])):
break;
case ($down_for_maint_flag && DOWN_FOR_MAINTENANCE_TYPE == 'strict'):
Around line 111 is another "switch" loop:
Code:
switch (true) {
/**
* check store status before authorizations
*/
case (STORE_STATUS != 0):
break;
/**
* bypass redirects for these scripts, to processing regardless of store mode or cust auth mode
*/
case (preg_match('|_handler\.php$|', $_SERVER['SCRIPT_NAME'])):
case (preg_match('|ajax\.php$|', $_SERVER['SCRIPT_NAME'])):
break;
case (CUSTOMERS_APPROVAL_AUTHORIZATION == '1' and $_SESSION['customer_id'] == ''):
Credit to @lhungil for suggestions
Bookmarks