OnGroupDelete
handler function( int group_id );The event OnGroupDelete is called when user group is deleted. Usually, the purpose of this event handler is to clean the database fr om records, associated with the deleted user group.
Parameters
Parameter | Description |
---|---|
group_id | Deleted user group ID. |
See Also
Example of handler function:
<? // file /bitrix/php_interface/init.php AddEventHandler("main", "OnGroupDelete", Array("MyClass", "OnGroupDeleteHandler"));
class MyClass { // create the event handler "OnGroupDelete" public static function OnGroupDeleteHandler($group_id) { // delete the associated records $strSql = "DELETE FROM my_table WH ERE GROUP_ID=".intval($group_id); $rs = $DB->Query($strSql, false, "FILE: ".__FILE__."<br>LINE: ".__LINE__); } } ?>
© «Bitrix24», 2001-2024