@
@
@pestunov2019-04-24 16:02:07
1C-Bitrix
@pestunov, 2019-04-24 16:02:07

How to create an infoblock or an inscription in Bitrix, visible only to the moderator?

How to create an infoblock or an inscription in Bitrix, visible only to the moderator?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
U
unsweet, 2019-04-24
_

1) If the moderator is an administrator, then
a)

global $USER;
if ($USER->IsAdmin())
{
    //надпись
}

b) in the settings of the infoblock, make access only to the administrator
2) If the moderator is a certain user from a certain group, then:
a) check whether the current user belongs to a group, for example, with id = 3
if ( CSite::InGroup( [3] ) )
{
    //надпись
}

b) the same only for group 3

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question