Check session variable before delivering cached page

>and this 3 lines of code should run somewhere where session is already available, but before page is loaded from cache

It’s possible only in development mode.

>3rd party is delivering batches of users that are beeing imported to a custom table in shopware database. So the login is just a matter of running a select query and checking if user with this credentials exists in a custom table in shopware database. This table however does not have any data that shopware customer needs (shipping address, email address, title, name ,…)

User should do registration via shopware, but after registration you shouldn’t do authorization for this user. After customer register - you redirect him to your custom login page, where he sign in with 3rd service credentials, if customer in 3rd service exist - you should authorize this user via shopware.

Look:

  1. In case you need to do sign in with 3rd service only once - you should create additional group, when user sign up - he can only see sign in to 3rd service page, as soon as this customer sign in - you change group to EK. Then use only shopware auth.

  2. In case you need to check 3rd part service all the time - you should use 3rd service auth instead of default shopware auth. In this case you need to add to this 3rd part service uniq identifier to bind shopware userId with 3rd part service.