Fixing UserProvider::refreshUser() so that it handles doctrine proxy objects correctly when unserialized from session