if(CModule::IncludeModule("forum")) { $rsUser = CForumUser::GetList(array(),array("SHOW_NAME" => 'N')); while($arrUser = $rsUser->Fetch()) { CForumUser::Update($arrUser['ID'], array("SHOW_NAME" => 'Y')); } }
AddEventHandler("main", "OnBeforeUserRegister", Array("CUserEx", "OnBeforeUserRegister")); AddEventHandler("main", "OnBeforeUserAdd", Array("CUserEx", "OnBeforeUserRegister")); class CUserEx { function OnBeforeUserRegister($arFields) { $arFields["forum_SHOW_NAME"] = "Y"; } }
Опубликовано: 7 декабря 2012
|
|