403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/socialnetwork/lib/livefeed/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /home/bitrix/ext_www/rospirotorg.ru/bitrix/modules/socialnetwork/lib/livefeed/bitrix24newuser.php
<?php

namespace Bitrix\Socialnetwork\Livefeed;

use Bitrix\Main\Localization\Loc;
use Bitrix\Main\UserTable;
use Bitrix\Socialnetwork\LogTable;

final class Bitrix24NewUser extends IntranetNewUser
{
	public const PROVIDER_ID = 'BITRIX24_NEW_USER';
	public const CONTENT_TYPE_ID = 'BITRIX24_NEW_USER';

	public function getEventId(): array
	{
		return [ 'bitrix24_new_user' ];
	}

	public function initSourceFields()
	{
		$ratingEntityId = $this->getEntityId();
		$userId = 0;

		if (!empty($ratingEntityId))
		{
			$res = LogTable::getList(array(
				'filter' => array(
					'@EVENT_ID' => $this->getEventId(),
					'=RATING_ENTITY_ID' => $ratingEntityId
				),
				'select' => array('ID', 'ENTITY_ID')
			));
			if ($logEntry = $res->fetch())
			{
				$this->setLogId($logEntry['ID']);
				$userId = $logEntry['ENTITY_ID'];
			}
		}

		if ($userId > 0)
		{
			$res = UserTable::getList(array(
				'filter' => array(
					'=ID' => $userId
				)
			));
			if ($user = $res->fetch())
			{
				$this->setSourceFields($user);

				$userName = \CUser::formatName(
					\CSite::getNameFormat(),
					$user,
					true,
					false
				);
				$user['FULL_NAME'] = $userName;

				$this->setSourceFields(array_merge($user, array('LOG_ENTRY' => $logEntry)));
				$this->setSourceTitle(Loc::getMessage('SONET_LIVEFEED_BITRIX24_NEW_USER_TITLE', array(
					'#USER_NAME#' => $userName
				)));
			}
		}
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit