Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
userauth.php
1
<?
2
3
namespace
Bitrix\Sender\Integration\Main\Triggers
;
4
5
use
Bitrix\Main\Context
;
6
use
Bitrix\Main\Localization\Loc
;
7
use
Bitrix\Sender\Trigger\Base
as TriggerBase;
8
9
Loc::loadMessages
(__FILE__);
10
11
class
UserAuth
extends
TriggerBase
12
{
13
public
function
getName
()
14
{
15
return
Loc::getMessage
(
'sender_trigger_user_auth_name'
);
16
}
17
18
public
function
getCode
()
19
{
20
return
"user_auth"
;
21
}
22
23
public
function
getEventModuleId
()
24
{
25
return
'main'
;
26
}
27
28
public
function
getEventType
()
29
{
30
return
"OnAfterUserAuthorize"
;
31
}
32
33
public
function
filter
()
34
{
35
if
($this->
getSiteId
() ==
Context::getCurrent
()->getSite())
36
{
37
return
true
;
38
}
39
else
40
{
41
return
false
;
42
}
43
}
44
45
public
function
getRecipient
()
46
{
47
$eventData = $this->
getParam
(
'EVENT'
);
48
49
if
(empty($eventData[0][
'user_fields'
]))
50
return
null
;
51
52
return
array(
53
'EMAIL'
=> $eventData[0][
'user_fields'
][
'EMAIL'
],
54
'USER_ID'
=> $eventData[0][
'user_fields'
][
'ID'
],
55
'NAME'
=> $eventData[0][
'user_fields'
][
'NAME'
],
56
);
57
}
58
}
Bitrix\Main\Context\getCurrent
static getCurrent()
Definition
context.php:241
Bitrix\Main\Localization\Loc
Definition
loc.php:11
Bitrix\Main\Localization\Loc\loadMessages
static loadMessages($file)
Definition
loc.php:64
Bitrix\Main\Localization\Loc\getMessage
static getMessage($code, $replace=null, $language=null)
Definition
loc.php:29
Bitrix\Sender\Connector\Base
Definition
base.php:13
Bitrix\Sender\Integration\Main\Triggers\UserAuth
Definition
userauth.php:12
Bitrix\Sender\Integration\Main\Triggers\UserAuth\getEventModuleId
getEventModuleId()
Definition
userauth.php:23
Bitrix\Sender\Integration\Main\Triggers\UserAuth\getRecipient
getRecipient()
Definition
userauth.php:45
Bitrix\Sender\Integration\Main\Triggers\UserAuth\getName
getName()
Definition
userauth.php:13
Bitrix\Sender\Integration\Main\Triggers\UserAuth\getEventType
getEventType()
Definition
userauth.php:28
Bitrix\Sender\Integration\Main\Triggers\UserAuth\filter
filter()
Definition
userauth.php:33
Bitrix\Sender\Integration\Main\Triggers\UserAuth\getCode
getCode()
Definition
userauth.php:18
Bitrix\Sender\Trigger\Base\getSiteId
getSiteId()
Definition
base.php:55
Bitrix\Sender\Trigger\Base\getParam
getParam($name, $defaultValue=null)
Definition
base.php:188
Bitrix\Main\Context
Definition
culture.php:9
Bitrix\Sender\Integration\Main\Triggers
Definition
userauth.php:3
modules
sender
lib
integration
main
triggers
userauth.php
Создано системой
1.10.0