Esempio n. 1
0
     $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;