Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
IpPerUser.php
1<?php
2
4
7
8class IpPerUser extends Base
9{
11 use SkippingUnauthorized;
12
13 public function getEntityId(): string
14 {
15 return 'ipu_' . $this->getEntity();
16 }
17
18 protected function getOptionLimitName(): string
19 {
20 return 'network_restriction_ip_per_user';
21 }
22
23 protected function getEntity(): string
24 {
25 return (string)($this->message->getAuthorId() ?: CurrentUser::get()->getId());
26 }
27
28 protected function getCurrentAdditionalParam(): string
29 {
30 return Context::getCurrent()->getServer()->getRemoteAddr();
31 }
32
33 protected function getDefaultLimit(): int
34 {
35 return 0;
36 }
37
38}
static getCurrent()
Definition context.php:241