
Originally Posted by
Danielle
It behaves the same way, if I am not logged in, it takes me to the login page. If I am logged in, it takes me to the My Account page, regardless of whether my user account has special privileges or not.
I have zipped the includes folder and e-mailed it to you.
Thanks!
Danielle,
I checked your includes folder but can't find anything sinister.
The file that tests for restrictions and privileges is
includes/modules/pages/index/header_php.php
The relevant code at the end of that file is
PHP Code:
// ********* bof CATEGORY_RESTRICTION **********
/**
* we want product details of certain categories to be accessible by members only so redirect them to the login page
*/
if (!$_SESSION['customer_id'] && !$_SESSION['customers_privileges'] > 0 && in_array($current_category_id,explode(',', CATEGORY_RESTRICTION_LOGIN_CATEGORY)) ) {
$_SESSION['navigation']->set_snapshot();
zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
}
/**
* we are testing if a logged in customer has special privileges to view products in this category
*/
if ($_SESSION['customer_id'] && !$_SESSION['customers_privileges'] > 0 && in_array($current_category_id,explode(',', CATEGORY_RESTRICTION_LOGIN_CATEGORY)) ) {
$_SESSION['navigation']->set_snapshot();
zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
}
/**
* we are testing if a logged in customer has special privileges to view products of a restricted manufacturer
*/
if (!$_SESSION['customers_privileges'] > 0 && in_array($_GET['manufacturers_id'],explode(',', CATEGORY_RESTRICTION_LOGIN_MANUFACTURER)) ) {
$_SESSION['navigation']->set_snapshot();
zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
}
if ($_SESSION['customer_id'] && !$_SESSION['customers_privileges'] > 0 && in_array($_GET['manufacturers_id'],explode(',', CATEGORY_RESTRICTION_LOGIN_MANUFACTURER)) ) {
$_SESSION['navigation']->set_snapshot();
zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
}
// ********* eof CATEGORY_RESTRICTION **********
// This should be last line of the script:
$zco_notifier->notify('NOTIFY_HEADER_END_INDEX');
... and all of that code looks perfectly ok to me in your file
Can you please double check that your admin/customers.php file has been merged correctly. I am beginning to think that special privileges are not being posted to the DB when editing customer details and the customer remains a *normal" customer (no privileges).
Thanks / Frank