fix for last admin detection & user deletion
This commit is contained in:
parent
cb475be7e2
commit
3568349b00
@ -284,7 +284,15 @@ function setCompanyForUser($ID, $REQ, $replace = false)
|
||||
помечаем админов на удаление из этой компании
|
||||
*/
|
||||
|
||||
$admins_to_remove = $existed_client_record['PROPERTIES']['ADMINS']['VALUE'];
|
||||
$current_admins = $existed_client_record['PROPERTIES']['ADMINS']['VALUE'];
|
||||
|
||||
foreach($current_admins AS $ca_id)
|
||||
{
|
||||
if(intval($ID) !== intval($ca_id))
|
||||
{
|
||||
array_push($admins_to_remove, $ca_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user