<commit_before><?php
/**
 * Engine which retrieves the email notification recipients for a category-related event.
 * 
 * @package plugins.emailNotification
 * @subpackage Scheduler
 */
class KEmailNotificationCategoryRecipientEngine extends KEmailNotificationRecipientEngine
{
	/* (non-PHPdoc)
	 * @see KEmailNotificationRecipientEngine::getRecipients()
	 */ 
	function getRecipients(array $contentParameters)
	{
		//List categoryKusers
		//TODO add paging logic
		$categoryUserFilter = new KalturaCategoryUserFilter();
		$categoryUserFilter->categoryIdEqual = $this->recipientJobData->categoryId;
		$categoryUserFilter->permissionNamesMatchOr = 'CATEGORY_PERMISSION_SUBSCRIBE';
		$categoryUserList = $this->client->categoryUser->listAction($categoryUserFilter, new KalturaFilterPager());
		
		$categoryUserIds = array();
		foreach ($categoryUserList->objects as $categoryUser)
			$categoryUserIds[] = $categoryUser->id;
		$userFilter = new KalturaUserFilter();
		$userFilter->idIn = implode(',', $categoryUserIds);
		$userList = $this->client->user->listAction($userFilter, new KalturaFilterPager);
		
		$recipients = array();
		foreach ($userList->objects as $user)
		{
			$recipients[$user->email] = $user->firstName. ' ' . $user->lastName;
		}
		<commit_msg>fwr: fix wrong property name<commit_after><?php
/**
 * Engine which retrieves the email notification recipients for a category-related event.
 * 
 * @package plugins.emailNotification
 * @subpackage Scheduler
 */
class KEmailNotificationCategoryRecipientEngine extends KEmailNotificationRecipientEngine
{
	/* (non-PHPdoc)
	 * @see KEmailNotificationRecipientEngine::getRecipients()
	 */ 
	function getRecipients(array $contentParameters)
	{
		//List categoryKusers
		//TODO add paging logic
		$categoryUserFilter = new KalturaCategoryUserFilter();
		$categoryUserFilter->categoryIdEqual = $this->recipientJobData->categoryId;
		$categoryUserFilter->permissionNamesMatchOr = 'CATEGORY_PERMISSION_SUBSCRIBE';
		$categoryUserList = $this->client->categoryUser->listAction($categoryUserFilter, new KalturaFilterPager());
		
		$categoryUserIds = array();
		foreach ($categoryUserList->objects as $categoryUser)
			$categoryUserIds[] = $categoryUser->userId;
		$userFilter = new KalturaUserFilter();
		$userFilter->idIn = implode(',', $categoryUserIds);
		$userList = $this->client->user->listAction($userFilter, new KalturaFilterPager);
		
		$recipients = array();
		foreach ($userList->objects as $user)
		{
			$recipients[$user->email] = $user->firstName. ' ' . $user->lastName;
		}
		
{'fraction_non_alphanumeric': 0.12612966601178782, 'fraction_numerical': 0.0, 'mean_word_length': 5.753315649867374, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 37, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5665724', 'n_tokens_mistral': 819, 'n_tokens_neox': 742, 'n_words': 144}