Skip to content

[DoctrineBridge] Load refreshed user proxy #50813

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 7, 2023

Conversation

MatTheCat
Copy link
Contributor

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #50758
License MIT
Doc PR N/A

When exiting impersonation, the impersonator get refreshed in the original token. Problem is, the refreshed user can be a proxy if it is referenced by the impersonated. In that case, all its properties (except identifiers) will be null when it is unserialised by the ContextListener.

The refreshed user data will be needed anyways, so loading proxies in EntityUserProvider::refreshUser should not impact performance.

@nicolas-grekas
Copy link
Member

Thank you @MatTheCat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants