fixed UserProvider::refreshUser() not checking the class-name

Hello,

I ran into this bug today, and this commit fix it.
Could you merge this into 1.3?

Thanks