Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
verification.php
1
<?php
2
3
namespace
Bitrix\Sender\Integration\Bitrix24\Limitation
;
4
5
use
Bitrix\Main\Config\Option
;
6
12
class
Verification
13
{
14
public
static
function
isEmailConfirmed
(): bool
15
{
16
if
(! \
Bitrix
\Main\Loader::includeModule(
'bitrix24'
))
17
{
18
return
true
;
19
}
20
21
return \CBitrix24::isEmailConfirmed();
22
}
23
24
public
static
function
isPhoneConfirmed
(): bool
25
{
26
// no need to verify boxes
27
if
(! \
Bitrix
\Main\Loader::includeModule(
'bitrix24'
))
28
{
29
return
true
;
30
}
31
32
if
(\CBitrix24::isPhoneConfirmed())
33
{
34
return
true
;
35
}
36
37
// phone required only for new portals
38
if
(self::isMailingsUsed() && self::isForceCheckDisabled())
39
{
40
// remember verified state
41
\CBitrix24::setPhoneConfirmed(
true
);
42
return
true
;
43
}
44
45
return
false
;
46
}
47
51
private
static
function
isMailingsUsed(): bool
52
{
53
$letters = \Bitrix\Sender\Internals\Model\LetterTable::getList([
54
'select'
=> [
'ID'
],
55
'filter'
=> [
56
'=STATUS'
=> \
Bitrix
\
Sender
\Dispatch\Semantics::getFinishStates(),
57
'=MESSAGE_CODE'
=> \
Bitrix
\
Sender
\
Message
\iBase::CODE_MAIL
58
],
59
'limit'
=> 1,
60
]);
61
62
return
(
bool
)$letters->fetch();
63
}
64
69
private
static
function
isForceCheckDisabled()
70
{
71
return
Option::get(
'sender'
,
'force_phone_check'
,
'N'
) !==
'Y'
;
72
}
73
}
Bitrix\Main\Config\Option
Definition
option.php:15
Bitrix\Main\Mail\Sender
Definition
sender.php:13
Bitrix\Sender\Entity\Message
Definition
message.php:27
Bitrix\Sender\Integration\Bitrix24\Limitation\Verification
Definition
verification.php:13
Bitrix\Sender\Integration\Bitrix24\Limitation\Verification\isEmailConfirmed
static isEmailConfirmed()
Definition
verification.php:14
Bitrix\Sender\Integration\Bitrix24\Limitation\Verification\isPhoneConfirmed
static isPhoneConfirmed()
Definition
verification.php:24
Bitrix\Sender\Integration\Bitrix24\Limitation
Definition
dailylimit.php:9
Bitrix
modules
sender
lib
integration
bitrix24
limitation
verification.php
Создано системой
1.10.0