Answer the question
In order to leave comments, you need to log in
How to find out the current user from jscript in the browser in 1s Bitrix?
Hello.
To find out if a user is logged in or not from the server (and php) point of view, you can write:
<?
global $USER;
if ($USER->IsAuthorized()) echo "You are authorized!";
?>
Answer the question
In order to leave comments, you need to log in
is the user logged in or not from the server point of view (and php)
for example, AJAX will check in the background on a timer, referring to a pre-prepared page
, you can specify the level of access to the page and make it a condition, for example, if js requests this page and the answer is that there is no access, you can also check the corresponding status by the timer
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question