$user is never passed into this function.

I think it should be passed as a parameter into this function rather than stored in a property.