Bitrix Site Manager

CForumPMFolder::Add

int
Add(
 array arFields 
);

The Add method creates a new folder with parameters specified in the arFields array.

Parameters

ParameterDescription
arFields An array of the format Array(field1=>value1[, field2=>value2 [, ..]]):
  • field - field name;
  • value - field value.
The fields are listed in the User folder table. The required fields must be present.

Return Values

The method returns the ID of the created folder on success, or false otherwise.

See Also

User folder table

Example



<?
$arFields = Array(
	TITLE        - > $TITLE,
	USER_ID      - > $USER_ID,     
);

$ID = CForumPMFolder::Add($arFields);

if (IntVal($ID)<=0)
    echo "Error!";
?>