uawdijnntqw1x1x1
IP : 18.188.103.42
Hostname : axolotl
Kernel : Linux axolotl 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
OS : Linux
PATH:
/
var
/
www
/
axolotl
/
data
/
www
/
nn.axolotls.ru
/
bitrix
/
modules
/
mobile
/
lib
/
user.php
/
/
<?php namespace Bitrix\Mobile; class User { function __construct() { } public static function checkOnline($userId = false) { $maxDate = 120; $timestamp = 0; if (\Bitrix\Main\Loader::includeModule('im')) { $status = \CIMStatus::GetStatus($userId); if ($status['MOBILE_LAST_DATE'] instanceof \Bitrix\Main\Type\DateTime) { $timestamp = $status['MOBILE_LAST_DATE']->getTimestamp(); } } else { $timestamp = \CUserOptions::GetOption('mobile', 'lastActivityDate', 0, $userId); } if (!$timestamp) { return false; } if (intval($timestamp)+$maxDate+60 > time()) { return true; } else { return false; } } public static function setOnline($userId = false, $cache = true) { global $USER; if (!$userId) { $userId = $USER->GetId(); } $userId = intval($userId); if ($userId <= 0) { return false; } if ($cache && $userId == $USER->GetId()) { if (isset($_SESSION['MOBILE_LAST_ONLINE_'.$userId]) && intval($_SESSION['MOBILE_LAST_ONLINE_'.$userId])+60 > time()) return false; $_SESSION['MOBILE_LAST_ONLINE_'.$userId] = time(); } $time = time(); if (\Bitrix\Main\Loader::includeModule('im')) { \CIMStatus::Set($userId, Array('MOBILE_LAST_DATE' => \Bitrix\Main\Type\DateTime::createFromTimestamp($time))); } else { \CUserOptions::SetOption('mobile', 'lastActivityDate', $time, false, $userId); } $mobileDevice = \Bitrix\Main\Context::getCurrent()->getRequest()->getCookieRaw('MOBILE_DEVICE'); if ($mobileDevice) { $mobileDevice = strtolower($mobileDevice); if ($mobileDevice === 'iphone' || $mobileDevice === 'ipad') { $lastTimestamp = (int)\CUserOptions::GetOption('mobile', 'iOsLastActivityDate', -1, $userId); if ($lastTimestamp+86400*30 < time()) { \CUserOptions::SetOption('mobile', 'iOsLastActivityDate', $time, false, $userId); } } else if ($mobileDevice === 'android') { $lastTimestamp = (int)\CUserOptions::GetOption('mobile', 'AndroidLastActivityDate', -1, $userId); if ($lastTimestamp+86400*30 < time()) { \CUserOptions::SetOption('mobile', 'AndroidLastActivityDate', $time, false, $userId); } } } return true; } public static function setOffline($userId = false) { global $USER; if (!$userId) { $userId = $USER->GetId(); } $userId = intval($userId); if ($userId <= 0) { return false; } if (\Bitrix\Main\Loader::includeModule('im')) { \CIMStatus::Set($userId, Array('MOBILE_LAST_DATE' => null)); } else { \CUserOptions::DeleteOption('mobile', 'lastActivityDate', false, $userId); } return false; } }
/var/www/axolotl/data/www/nn.axolotls.ru/bitrix/modules/mobile/lib/user.php