Why not picked up abandoned shopping cart?

Good afternoon.

The essence of the problem.
For example, a user visits the site and is authenticated. After gaining the items in the basket and leaves. The system remains abandoned shopping cart.
After some time the user returns, but abandoned shopping cart it has not picked up. If you look through the admin area, the cart is tied to the desired user. However, when it comes to the page of the basket he throws out the error "Your shopping cart is empty".

Having found such a feature. Because basket in Bitrix attached to the user directly, and a buyer ID(table b_sale_fuser) there is a mess with these IDs. To obtain this ID, you have two methods:
CSaleBasket::GetBasketUserID();
Sale\Fuser::getId(); // D7

While the user netlogin on the website, both methods return the same value (e.g. 2). After authorization method CSaleBasket::GetBasketUserID() continues to give fuser_id 2, but the method of Sale\Fuser::getId() returns fuser_id 1.
If you look at the database table b_sale_fuser, it turns out that recording from fuser_id = 1 refers to our user with the abandoned cart, and fuser_id = 2 refers to the user_id = NULL.

It turns out there are two baskets. The most unpleasant is that component of the basket in the system receives the contents of the basket, just answer method CSaleBasket::GetBasketUserID().

Is it possible for this behavior to influence? Or maybe I missed something in the settings of Bitrix?
June 10th 19 at 15:30
1 answer
June 10th 19 at 15:32
Solution
By process of elimination it turned out to determine and solve the problem.

The problem was that init.php were caught the event after logging in and produced Reichert, in the same way as described here.
Support Bitrix told that with this implementation of such a redirect will likely not have time to work out some api methods of the directory, in consequence of which in the system one user has two different fuser_id.

A waiver of such redirection decided and the other questionthat I asked earlier.

Find more questions by tags 1C-Bitrix