T
T
Tarrissarh2019-09-21 10:42:00
1C-Bitrix
Tarrissarh, 2019-09-21 10:42:00

Why doesn't checking for user authorization work in OnBeforeProlog?

There is a component of authorization, authorization happens through ajax and $USER->Login.
In the component, authorization itself passes without problems.
But there is also a handler for the OnBeforeProlog event and it checks the user for authorization, which constantly fails...
The authorization path turns out to be:
1. Sending an ajax request
2. Processing OnBeforeProlog ($USER->IsAuthorized() -> false)
3. Handling ajax to the component ($USER->IsAuthorized() -> true)
4. Returning the correct data to the js reload of the page
5. Handling OnBeforeProlog ($USER->IsAuthorized() -> false)
What could be the problem?
It seems that when OnBeforeProlog starts, delogging occurs, but this is nonsense, there is no such functionality.
The coolest thing is that this problem exists only for new users, those users who were created before, log in without problems ...
global $USER is specified, the user module is connected.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2019-09-21
Madzhugin @Suntechnic

I read it twice and did not understand ...
Here is point 5 - is it generally the processing of what request? next?
I correctly understood that in paragraph 3 you logged in the user and checked that she is logged in?
And in point 4 they threw out the exhaust and did not call the footer?
PS The option above is not a solution.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question