A
A
Anton2018-07-23 14:18:04
1C-Bitrix
Anton, 2018-07-23 14:18:04

How to deal with a glitch with global $USER?

On all pages of the site, this code works as it should.

<?
global $USER;
if ($USER->IsAdmin()) echo "Вы администратор!";
?>

But on one of the pages bitrix/templates/template name/components/bitrix/catalog.section/section_page/template.php
this code displays the result even for an unauthorized user.
And if you display your own user ID, then the same ID is displayed for an unauthorized user.
I can't figure out why, what's wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita, 2018-07-23
@Rema1ns

how to drink give, run around the cash

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question