Add
int CBlogUserGroup::Add( array arFields );
The method adds a new blog user group. Non-static method.
Note: when the module is installed, two blog user groups are created. These two groups are available for all blogs: "All visitors" and "Authorized visitors". The next group that is created will associated with the specific blog and will have the ID, equal to 3.
Method parameters
Parameter | Description |
---|---|
arFields | Array of the array("field"=>"value"[, ...])type, containing values of the fields for the blog user group. |
Returned value
The method returns the ID of the added user group, if the adding was successful. When an error occurs, the method will return false, and exceptions will contain errors.See Also
Examples of use
<? $arFields = array( "NAME" => 'Friends', "BLOG_ID" => 1 ); $newID = CBlogUserGroup::Add($arFields); if(IntVal($newID)>0) { echo "New group [".$newID."] is added."; } else { if ($ex = $APPLICATION->GetException()) echo $ex->GetString(); } ?>
© «Bitrix24», 2001-2024