* Updated getUserData() to cast using dynamic_cast.