fix strict function definition for getUserPreference