本文整理汇总了PHP中CSaleUserAccount::GetByUserID方法的典型用法代码示例。如果您正苦于以下问题:PHP CSaleUserAccount::GetByUserID方法的具体用法?PHP CSaleUserAccount::GetByUserID怎么用?PHP CSaleUserAccount::GetByUserID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSaleUserAccount
的用法示例。
在下文中一共展示了CSaleUserAccount::GetByUserID方法的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"]);
}
}
示例2: Array
/*.personal-menu1 { position: absolute;}
.personal-menu1 ul {margin-left: -41px; margin-bottom: -15px;}
.personal-menu1 ul li {list-style: none;}
.personal-menu1 ul li a{width: 171px; display: block; line-height: 0.7em; padding: 19px 0px; margin: 0px 0px 16px; background: none repeat scroll 0% 0% #BFBFBF; text-align: center; color: #FFF; font-weight: 400; font-size: 16px; font-family: "Open Sans",sans-serif; text-decoration: none; border-radius: 5px;}
.personal-menu1 ul li a.active{background: none repeat scroll 0% 0% #F15824;}*/
</style>
<?
global $USER;
CModule::IncludeModule('sale');
$rsUser = CUser::GetByID($USER->GetID());
$arUser = $rsUser->Fetch();
$avatar = CFile::ResizeImageGet($arUser["PERSONAL_PHOTO"], Array("width" => 170, "height" => 170), BX_RESIZE_IMAGE_PROPORTIONAL_ALT );
$buyer = CSaleUserAccount::GetByUserID($USER->GetID(), 'RUB');
?>
<script src="/src/javascript/tabs.js"></script>
<div class="block-gr">
<div class="main">
<div class="cabinet">
<div class="cabinet-box">
<div class="cab-img">
<?if (!$arUser['PERSONAL_PHOTO']) : ?>
<img src="/src/images/no_pic.png" alt="" style="width: 121px;">
<?else : ?>
<img src="<?php
echo $avatar['src'];
?>
" alt="">
<?endif;?>
示例3: GetMessage
$errorMessage .= $ex->GetString() . ".<br>";
} else {
$errorMessage .= GetMessage("SAE_ERROR_SAVING") . ".<br>";
}
}
}
if (strlen($errorMessage) <= 0 and $currentLocked != "") {
if ($_POST["UNLOCK"] == "Y") {
CSaleUserAccount::UnLock($USER_ID, $CURRENCY);
}
if ($_POST["UNLOCK"] == "N" or $currentLocked == "Y" and !isset($_POST["UNLOCK"])) {
CSaleUserAccount::Lock($USER_ID, $CURRENCY);
}
}
if (strlen($errorMessage) <= 0) {
$arUserAccount = CSaleUserAccount::GetByUserID($USER_ID, $CURRENCY);
if (DoubleVal($arUserAccount["CURRENT_BUDGET"]) != $CURRENT_BUDGET) {
$errorMessage .= GetMessage("SAE_ERROR_SAVING_SUM") . ".<br>";
}
}
if (strlen($errorMessage) <= 0) {
$ID = IntVal($arUserAccount["ID"]);
$arFields = array("NOTES" => strlen($NOTES) > 0 ? $NOTES : False);
if (!CSaleUserAccount::Update($ID, $arFields)) {
if ($ex = $APPLICATION->GetException()) {
$errorMessage .= $ex->GetString() . ".<br>";
} else {
$errorMessage .= GetMessage("SAE_ERROR_SAVING_COMMENT") . ".<br>";
}
}
}