Add
int CBlogCandidate::Add( array arFields );
The method adds a user to the list of candidates who wish to join the blog friends. Non-static method.
Method parameters
Parameter | Description |
---|---|
arFields | Array of the array("BLOG_ID"=>"value", "USER_ID"=>"value") type. |
Returned value
The method returns the ID of the added record, if the adding was successful. When an error occurs, the method will return false.See Also
Examples of use
<? //add the current user to the list of users who wish to join the blog friends // with ID 1 $arFields = array( "BLOG_ID" => 1, "USER_ID" => $USER->GetID() ); $newID = CBlogCandidate::Add($arFields); if(IntVal($newID)>0) { echo "You are added to the list of candidates who wish to join the blog friends"; } else { if ($ex = $APPLICATION->GetException()) echo $ex->GetString(); } ?>
© «Bitrix24», 2001-2024