1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
util.php
См. документацию.
1<?php
2
3namespace Bitrix\Im\Call;
4
5class Util
6{
10 public static function getUsers(array $idList): array
11 {
12 $result = [];
13 foreach ($idList as $userId)
14 {
15 $user = \Bitrix\Im\User::getInstance($userId)->getArray(['JSON' => 'Y', 'HR_PHOTO' => true]);
16 $result[$userId] = [
17 'id' => $user['id'],
18 'first_name' => $user['first_name'],
19 'last_name' => $user['last_name'],
20 'name' => $user['name'],
21 'work_position' => $user['work_position'],
22 'extranet' => $user['extranet'],
23 'invited' => $user['invited'],
24 'last_activity_date' => $user['last_activity_date'],
25 'avatar' => $user['avatar'],
26 'avatar_hr' => $user['avatar_hr'],
27 'gender' => $user['gender'],
28 'color' => $user['color'],
29 'type' => $user['type'],
30 ];
31 }
32
33 return $result;
34 }
35
36 public static function generateUUID()
37 {
38 if (function_exists('random_bytes'))
39 {
40 $data = random_bytes(16);
41 }
42 elseif (function_exists('openssl_random_pseudo_bytes'))
43 {
44 $data = openssl_random_pseudo_bytes(16);
45 } else
46 {
47 $data = uniqid('', true);
48 }
49
50 // set version to 4
51 $data[6] = chr(ord($data[6]) & 0x0f | 0x40);
52
53 // set bits 6-7 to 10
54 $data[8] = chr(ord($data[8]) & 0x3f | 0x80);
55
56 return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));
57 }
58}
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения check_mail.php:18
Определения util.php:6
static getUsers(array $idList)
Определения util.php:10
static generateUUID()
Определения util.php:36
static getInstance($userId=null)
Определения user.php:45
$data['IS_AVAILABLE']
Определения .description.php:13
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$result
Определения get_property_values.php:14
$user
Определения mysql_to_pgsql.php:33
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
Определения prolog_main_admin.php:393