E
E
Evgeny Ivanov2021-11-25 07:46:32
Bitrix24
Evgeny Ivanov, 2021-11-25 07:46:32

How to access user data?

Bitrix 24 corporate portal. Created a simple PHP component that displays text on a page.
How can I now restrict the display of this text (code) only to registered users?
How to access user data?
It is clear that everything is stored in the database, but is there any method, superglobal array, etc.?
Type

if ($logged==true) { echo 'Текст для зарегистрированных пользователей';}
if ($username=='Иван') { echo 'Привет Иван';}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Edward, 2021-11-27
@Drayde

\Bitrix\Main\Engine\CurrentUser

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question