• Модуль: voximplant
  • Путь к файлу: ~/bitrix/modules/voximplant/classes/general/vi_user.php
  • Класс: CVoxImplantUser
  • Вызов: CVoxImplantUser::GetActiveStatusByTimeman
static function GetActiveStatusByTimeman($userId)
{
	if ($userId <= 0)
		return false;

	if (CModule::IncludeModule('timeman'))
	{
		$tmUser = new CTimeManUser($userId);
		$tmSettings = $tmUser->GetSettings(Array('UF_TIMEMAN'));
		if (!$tmSettings['UF_TIMEMAN'])
		{
			$result = true;
		}
		else
		{
			$tmUser->GetCurrentInfo(true); // need for reload cache

			if ($tmUser->State() == 'OPENED')
			{
				$result = true;
			}
			else
			{
				$result = false;
			}
		}
	}
	else
	{
		$result = true;
	}

	return $result;
}