本文整理汇总了PHP中CSocServAuthDB::Delete方法的典型用法代码示例。如果您正苦于以下问题:PHP CSocServAuthDB::Delete方法的具体用法?PHP CSocServAuthDB::Delete怎么用?PHP CSocServAuthDB::Delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSocServAuthDB
的用法示例。
在下文中一共展示了CSocServAuthDB::Delete方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deleteStorageTokens
protected function deleteStorageTokens()
{
global $USER;
if (is_object($USER) && $USER->IsAuthorized()) {
$dbSocservUser = CSocServAuthDB::GetList(array(), array('USER_ID' => $USER->GetID(), "EXTERNAL_AUTH_ID" => static::SERVICE_ID), false, false, array("ID"));
while ($accessToken = $dbSocservUser->Fetch()) {
CSocServAuthDB::Delete($accessToken['ID']);
}
}
}
示例2: foreach
}
if (is_array($arResult["DB_SOCSERV_USER"])) {
foreach ($arResult["DB_SOCSERV_USER"] as $key => $value) {
if ($value["EXTERNAL_AUTH_ID"] == 'Twitter') {
$arResult["DB_SOCSERV_USER"][$twitNum] = $arResult["DB_SOCSERV_USER"][$key];
unset($arResult["DB_SOCSERV_USER"][$key]);
$twitNum++;
}
}
}
$arParamsToDelete = array("openid_assoc_handle", "openid_identity", "openid_sreg_email", "openid_sreg_fullname", "openid_sreg_gender", "openid_mode", "openid_op_endpoint", "openid_response_nonce", "openid_return_to", "openid_signed", "openid_sig", "current_fieldset");
$add = CModule::IncludeModule("socialnetwork") && $_REQUEST["auth_service_id"] != '' && $componentTemplate == 'twitpost' ? "current_fieldset=SOCSERV" : "";
if ($_SERVER["REQUEST_METHOD"] == "GET" && $_REQUEST["action"] == "delete" && isset($_REQUEST["user_id"]) && intval($_REQUEST["user_id"] > 0) && check_bitrix_sessid()) {
$userId = intval($_REQUEST["user_id"]);
if (in_array($userId, $arResult["ALLOW_DELETE_ID"])) {
if (!CSocServAuthDB::Delete($userId)) {
$_SESSION["LAST_ERROR"] = GetMessage("DELETE_ERROR");
}
}
$backurl = '';
if ($arResult['BACKURL'] != '') {
$backurl = $arResult['BACKURL'];
if ($componentTemplate == 'twitpost') {
$backurl .= (strpos($arResult['BACKURL'], '?') > 0 ? "&" : "?") . "current_fieldset=SOCSERV";
}
} else {
$backurl = $APPLICATION->GetCurPageParam($componentTemplate == 'twitpost' ? "current_fieldset=SOCSERV" : "", array("sessid", "user_id", "action"));
}
LocalRedirect($backurl);
}
if ($componentTemplate == 'twitpost') {