1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
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\Sender\Integration\Bitrix24\Limitation\Verification
Определения
verification.php:13
Bitrix\Sender\Integration\Bitrix24\Limitation\Verification\isEmailConfirmed
static isEmailConfirmed()
Определения
verification.php:14
Bitrix\Sender\Integration\Bitrix24\Limitation\Verification\isPhoneConfirmed
static isPhoneConfirmed()
Определения
verification.php:24
Bitrix\Main\Mail\Sender
Определения
usersenderdataprovider.php:3
Bitrix\Main
Bitrix\Sender\Dispatch
Определения
duration.php:8
Bitrix\Sender\Message
Определения
adapter.php:9
Bitrix
bitrix
modules
sender
lib
integration
bitrix24
limitation
verification.php
Создано системой
1.14.0