AddEventHandler("main", "OnAfterUserRegister", "MyOnAfterUserRegister");
function MyOnAfterUserRegister($arFields)
{
if($arFields["USER_ID"]>0)
{
if(!CModule::IncludeModule("iblock"))
{
$this->AbortResultCache();
return;
}
$el = new CIBlockElement;
$props["P_USER"]=$arFields["USER_ID"];
$UEvent = Array("NAME"=>$arFields["LOGIN"],"IBLOCK_ID"=>15,"IBLOCK_SECTION_ID" => false,"ACTIVE"=>"Y","PROPERTY_VALUES"=>$props);
$el->Add($UEvent,false,false);
}
} |