Esempio n. 1
0
 function bitcommerce_user_expunge(&$pObject)
 {
     if (is_a($pObject, 'BitUser') && !empty($pObject->mUserId)) {
         require_once BITCOMMERCE_PKG_PATH . 'includes/bitcommerce_start_inc.php';
         $pObject->StartTrans();
         $exCustomer = new CommerceCustomer($pObject->mUserId);
         if ($exCustomer->load()) {
             $exCustomer->expunge();
         }
         $pObject->CompleteTrans();
     }
 }
require_once DIR_FS_CLASSES . 'sniffer.php';
$sniffer = new sniffer();
if (!empty($_SESSION['customer_id']) && !$gBitUser->isRegistered()) {
    // we have lost our bitweaver login
    unset($_SESSION['customer_id']);
    $customerId = NULL;
} elseif ($gBitUser->isRegistered()) {
    CommerceCustomer::syncBitUser($gBitUser->mInfo);
    $_SESSION['customer_id'] = $gBitUser->mUserId;
    $customerId = $gBitUser->mUserId;
} else {
    $customerId = NULL;
}
global $gBitCustomer, $gCommerceCart;
$gBitCustomer = new CommerceCustomer($customerId);
$gBitCustomer->load();
$gBitSmarty->assign('gBitCustomer', $gBitCustomer);
// lookup information
require BITCOMMERCE_PKG_PATH . 'includes/functions/functions_lookups.php';
if (!isset($_SESSION['cc_id'])) {
    $_SESSION['cc_id'] = NULL;
}
// include currencies class and create an instance
require_once DIR_FS_CLASSES . 'currencies.php';
global $currencies;
$currencies = new currencies();
$gBitSmarty->assign('gCommerceCurrencies', $currencies);
require_once DIR_FS_CLASSES . 'category_tree.php';
// taxes
require_once DIR_FS_FUNCTIONS . 'functions_taxes.php';
// set the top level domains