Exemple #1
0
                $BLOG_USER_ID = CBlogUser::Add($arblogFields);
                $blog_res = intval($BLOG_USER_ID) > 0;
            }
            if ($ex = $APPLICATION->GetException()) {
                $strError = $ex->GetString();
            }
        }
    }
    if (CModule::IncludeModule("learning") && $strError == '') {
        $arStudentFields = array("RESUME" => $_REQUEST["student_RESUME"], "PUBLIC_PROFILE" => $_REQUEST["student_PUBLIC_PROFILE"] == "Y" ? "Y" : "N");
        $ar_res = CStudent::GetList(array(), array("USER_ID" => $arResult["ID"]));
        if ($arStudent = $ar_res->Fetch()) {
            $learning_res = CStudent::Update($arResult["ID"], $arStudentFields);
        } else {
            $arStudentFields["USER_ID"] = $arResult["ID"];
            $STUDENT_USER_ID = CStudent::Add($arStudentFields);
            $learning_res = intval($STUDENT_USER_ID) > 0;
        }
    }
    if ($strError == '') {
        if ($arParams['SEND_INFO'] == 'Y') {
            $obUser->SendUserInfo($arResult["ID"], SITE_ID, GetMessage("ACCOUNT_UPDATE"), true);
        }
        $bOk = true;
    }
}
$rsUser = CUser::GetByID($arResult["ID"]);
if (!($arResult["arUser"] = $rsUser->GetNext(false))) {
    $arResult["ID"] = 0;
}
if (CModule::IncludeModule("blog")) {