Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AmiBX
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bitrix
AmiBX
Commits
0bdf9531
Commit
0bdf9531
authored
Mar 07, 2022
by
Kulya
😊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix clearing inner_phone for inactive users
parent
07be8b61
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
AloVoiceActions.php
vendor/alovoice/src/AloVoiceActions.php
+7
-1
BitrixEvents.php
vendor/alovoice/src/BitrixEvents.php
+6
-0
No files found.
vendor/alovoice/src/AloVoiceActions.php
View file @
0bdf9531
...
...
@@ -124,11 +124,17 @@ class AloVoiceActions
));
$bxUserPhones
=
array
();
$GLOBALS
[
"inactive_phones"
]
=
array
();
if
(
!
empty
(
$bxOnlineUsers
[
"result"
])){
foreach
(
$bxOnlineUsers
[
"result"
]
as
$bxonUser
){
if
(
!
empty
(
$bxonUser
[
"UF_PHONE_INNER"
])){
if
(
!
empty
(
$bxonUser
[
"ACTIVE"
])){
$bxUserPhones
[]
=
$bxonUser
[
"UF_PHONE_INNER"
];
}
else
{
$GLOBALS
[
"inactive_phones"
]
=
$bxonUser
[
"ID"
];
}
}
}
}
...
...
vendor/alovoice/src/BitrixEvents.php
View file @
0bdf9531
...
...
@@ -1415,6 +1415,12 @@ class BitrixEvents
$resUsUpdate
=
BxRest
::
call
(
'user.update'
,
array
(
"ID"
=>
$this
->
bxData
[
"ID"
],
"UF_PHONE_INNER"
=>
$newPhoneInner
));
ALVC
::
eLog
(
$resUsUpdate
,
"------ Events.php :: ONUSERADD resUsUpdate: ----------"
);
if
(
!
empty
(
$GLOBALS
[
"inactive_phones"
])){
foreach
(
$GLOBALS
[
"inactive_phones"
]
as
$incUserId
){
$resUsUpdate
=
BxRest
::
call
(
'user.update'
,
array
(
"ID"
=>
$incUserId
,
"UF_PHONE_INNER"
=>
""
));
}
}
}
/*
{"ID":"420","ACTIVE":"1","LAST_LOGIN":"","DATE_REGISTER":"2021-05-07T03:00:00+03:00","IS_ONLINE":"N","NAME":"\u041a\u0443\u043b\u044f\u0442\u0435\u0441\u0442","LAST_NAME":"\u041a\u0443\u043b\u044f\u0442\u0435\u0441\u0442\u0444\u0430\u043c","PERSONAL_GENDER":"","PERSONAL_BIRTHDAY":"","PERSONAL_MOBILE":"+998994412860","UF_DEPARTMENT":["488"]}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment