I'm using Symfony session management system with PdoSessionHandler and I need to find specific session entry using user id saved in session data.
Because manually searching every session blob data could be costly my idea is to add another column into sessions table to specifically store user_id so I can tie session entry to the user.
My question is how to achieve this using existing Session module?
Another important info is that I'm using standalone Session module outside Symfony framework.
Here is simplified code that I use for initializing session module:
new Session(
new NativeSessionStorage([], new PdoSessionHandler(new PDO())),
new NamespacedAttributeBag()
)