S
S
Salavat2014-04-25 13:43:10
PHP
Salavat, 2014-04-25 13:43:10

Bitrix API: How to get the "Symbol ID" of a user's group?

Searched here but didn't find it:
Gets an array of group IDs to which the current user belongs:

<?global $USER;
$arGroups = $USER->GetUserGroupArray();
echo "<pre>"; print_r($arGroups); echo "</pre>";
?>

How to pull out "Symbol ID"?
928c0ef03ffd4e44a2b577e8ff89ffeb.png
Initial task:
One type of infoblock. Sections can be used. Multiple user groups. For each group, show only the elements of the corresponding section. Where to bind?
or
One type of infoblock. Elements have a property - binding to elements of another infoblock. Associate (compare) this infoblock with the symbolic identifier of the group.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
beono, 2014-04-25
@Salavat

$rsGroups = \CUser::GetUserGroupEx($user_id);
while($arGroup = $rsGroups->GetNext()) {
  echo $arGroup['STRING_ID'];
}

Use extended partition rights and allow only a specific group to read on each partition. In CIBlockElement::GetList request use CHECK_PERMISSIONS

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question