當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CSaleUserAccount::Delete方法代碼示例

本文整理匯總了PHP中CSaleUserAccount::Delete方法的典型用法代碼示例。如果您正苦於以下問題:PHP CSaleUserAccount::Delete方法的具體用法?PHP CSaleUserAccount::Delete怎麽用?PHP CSaleUserAccount::Delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CSaleUserAccount的用法示例。


在下文中一共展示了CSaleUserAccount::Delete方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: OnBeforeUserDeleteHandler

 function OnBeforeUserDeleteHandler($user_id)
 {
     \CModule::IncludeModule("iblock");
     \CModule::IncludeModule("sale");
     //Привязки к соц. сетям
     $arrFilter = array("IBLOCK_ID" => USER_SOCIAL_IB, "PROPERTY_USER_ID" => $user_id);
     $arSelect = array("ID");
     $rsRes = \CIBlockElement::GetList($arOrder, $arrFilter, false, false, $arSelect);
     while ($arItem = $rsRes->GetNext()) {
         \CIBlockElement::Delete($arItem["ID"]);
     }
     //Удаляем записи
     $result = \Hawkart\Megatv\RecordTable::getList(array('filter' => array("UF_USER_ID" => $user_id), 'select' => array("ID")));
     while ($arRecord = $result->fetch()) {
         \CRecordEx::delete($arRecord["ID"]);
     }
     //Удаляем счет
     if ($arAccount = \CSaleUserAccount::GetByUserID($user_id, "RUR")) {
         \CSaleUserAccount::Delete($arAccount["ID"]);
     }
     //Удаляем заказы
     $arFilter = array("USER_ID" => $user_id);
     $db_sales = \CSaleOrder::GetList(array("DATE_INSERT" => "ASC"), $arFilter);
     while ($ar_sales = $db_sales->Fetch()) {
         \CSaleOrder::Delete($ar_sales["ID"]);
     }
     //Удаляем подписки
     $result = \Hawkart\Megatv\SubscribeTable::getList(array('filter' => array("=UF_USER_ID" => $user_id), 'select' => array("ID")));
     if ($arSub = $result->fetch()) {
         \Hawkart\Megatv\SubscribeTable::delete($arSub["ID"]);
     }
 }
開發者ID:Hawkart,項目名稱:megatv,代碼行數:32,代碼來源:CUserEx.php

示例2: OnUserDelete

 public static function OnUserDelete($userID)
 {
     $userID = IntVal($userID);
     $bSuccess = True;
     $dbUserAccounts = CSaleUserAccount::GetList(array(), array("USER_ID" => $userID), false, false, array("ID"));
     while ($arUserAccount = $dbUserAccounts->Fetch()) {
         if (!CSaleUserAccount::Delete($arUserAccount["ID"])) {
             $bSuccess = False;
         }
     }
     return $bSuccess;
 }
開發者ID:andy-profi,項目名稱:bxApiDocs,代碼行數:12,代碼來源:user.php

示例3: while

     while ($arAccountList = $dbResultList->Fetch()) {
         $arID[] = $arAccountList['ID'];
     }
 }
 foreach ($arID as $ID) {
     if (strlen($ID) <= 0) {
         continue;
     }
     switch ($_REQUEST['action']) {
         case "delete":
             @set_time_limit(0);
             if ($saleModulePermissions >= "W") {
                 $DB->StartTransaction();
                 if ($arDelAccount = CSaleUserAccount::GetByID($ID)) {
                     if (CSaleUserAccount::UpdateAccount($arDelAccount["USER_ID"], -$arDelAccount["CURRENT_BUDGET"], $arDelAccount["CURRENCY"], "DEL_ACCOUNT", 0)) {
                         if (!CSaleUserAccount::Delete($ID)) {
                             $DB->Rollback();
                             if ($ex = $APPLICATION->GetException()) {
                                 $lAdmin->AddGroupError($ex->GetString(), $ID);
                             } else {
                                 $lAdmin->AddGroupError(str_replace("#ID#", $ID, GetMessage("SAA_ERROR_DELETE")), $ID);
                             }
                         }
                     } else {
                         $DB->Rollback();
                         if ($ex = $APPLICATION->GetException()) {
                             $lAdmin->AddGroupError($ex->GetString(), $ID);
                         } else {
                             $lAdmin->AddGroupError(str_replace("#ID#", $ID, GetMessage("SAA_ERROR_MONEY")), $ID);
                         }
                     }
開發者ID:k-kalashnikov,項目名稱:geekcon_new,代碼行數:31,代碼來源:account_admin.php


注:本文中的CSaleUserAccount::Delete方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。