getTemplateUserId: Bitrix method

      
<?php 
//  getTemplateUserId()
//  /dist/bitrix/modules/bizproc/classes/general/activity.php:110

    
public function getTemplateUserId()
    {
        
$userId 0;
        
$rootActivity $this->GetRootActivity();
        
//prevent recursion by checking setter
        
if (method_exists($rootActivity'setTemplateUserId'))
        {
            
$userId $rootActivity->getTemplateUserId();
        }

        if (!
$userId && $tplId $this->GetWorkflowTemplateId())
        {
            
$userId CBPWorkflowTemplateLoader::getTemplateUserId($tplId);
        }

        return 
$userId;
    }