CAdvContract::GetOwnerEmails: Bitrix method

      
<?php 
//  CAdvContract :: GetOwnerEmails()
//  /dist/bitrix/modules/advertising/classes/general/advertising.php:238

    
public static function GetOwnerEmails($CONTRACT_ID, &$OWNER_EMAIL, &$ADD_EMAIL, &$VIEW_EMAIL, &$EDIT_EMAIL)
    {
        
$OWNER_EMAIL = array();
        
$VIEW_EMAIL = array();
        
$ADD_EMAIL = array();
        
$EDIT_EMAIL = array();
        
$arrPERM CAdvContract::GetContractPermissions($CONTRACT_ID);
        while (list(
$perm$arr) = each($arrPERM))
        {
            if (
is_array($arr) && count($arr)>0)
            {
                foreach(
$arr as $ar)
                {
                    
$OWNER_EMAIL[] = $ar["USER_EMAIL"];
                    if (
$perm=="VIEW")    $VIEW_EMAIL[] = $ar["USER_EMAIL"];
                    if (
$perm=="ADD")    $ADD_EMAIL[] = $ar["USER_EMAIL"];
                    if (
$perm=="EDIT")    $EDIT_EMAIL[] = $ar["USER_EMAIL"];
                }
            }
        }
        
$OWNER_EMAIL    array_unique($OWNER_EMAIL);
        
$VIEW_EMAIL        array_unique($VIEW_EMAIL);
        
$ADD_EMAIL        array_unique($ADD_EMAIL);
        
$EDIT_EMAIL        array_unique($EDIT_EMAIL);
    }