本文整理汇总了PHP中CSocNetUser::GetFieldsMap方法的典型用法代码示例。如果您正苦于以下问题:PHP CSocNetUser::GetFieldsMap方法的具体用法?PHP CSocNetUser::GetFieldsMap怎么用?PHP CSocNetUser::GetFieldsMap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSocNetUser
的用法示例。
在下文中一共展示了CSocNetUser::GetFieldsMap方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$arResult["User"]["WORK_LOCATION"] .= ", ";
}
$arResult["User"]["WORK_LOCATION"] .= $arResult["User"]["WORK_CITY"];
$arResult["Sex"] = array("M" => GetMessage("SONET_P_USER_SEX_M"), "F" => GetMessage("SONET_P_USER_SEX_F"));
if (strlen($arResult["User"]["PERSONAL_WWW"]) > 0) {
$arResult["User"]["PERSONAL_WWW"] = (strpos($arResult["User"]["PERSONAL_WWW"], "http") === false ? "http://" : "") . $arResult["User"]["PERSONAL_WWW"];
}
$arResult["UserFieldsMain"] = array("SHOW" => "N", "DATA" => array());
$arResult["UserFieldsContact"] = array("SHOW" => "N", "DATA" => array());
$arResult["UserFieldsPersonal"] = array("SHOW" => "N", "DATA" => array());
$arMonths_r = array();
for ($i = 1; $i <= 12; $i++) {
$arMonths_r[$i] = ToLower(GetMessage('MONTH_' . $i . '_S'));
}
if (count($arParams["USER_FIELDS_MAIN"]) > 0 || count($arParams["USER_FIELDS_CONTACT"]) > 0 || count($arParams["USER_FIELDS_PERSONAL"]) > 0) {
$arUserFieldsMap = CSocNetUser::GetFieldsMap(true);
$arUserTmp = $arResult["User"];
$arResult["User"] = array();
foreach ($arUserFieldsMap as $mapValue) {
if (array_key_exists($mapValue, $arUserTmp)) {
$arResult["User"][$mapValue] = $arUserTmp[$mapValue];
}
}
foreach ($arUserTmp as $key => $value) {
if (!array_key_exists($key, $arResult["User"])) {
$arResult["User"][$key] = $value;
}
}
foreach ($arResult["User"] as $userFieldName => $userFieldValue) {
if (in_array($userFieldName, $arParams["USER_FIELDS_MAIN"]) || in_array($userFieldName, $arParams["USER_FIELDS_CONTACT"]) || in_array($userFieldName, $arParams["USER_FIELDS_PERSONAL"])) {
$val = $userFieldValue;