Manual:User preferences

Retrieving user preferences
To retrieve all of a user's preferences, use User::getOptions.

To retrieve a specific preference of a user, use User::getOption with the name of the preference as a parameter, for example:

If the preference is of the multiselect type, the parameter will be . For example, if the preference name is 'searchNs' and the option value is '2', the parameter for getOption will be 'searchNs2'.

Setting default preferences
For information about how to set default preferences for all users, see Manual:$wgDefaultUserOptions.

Creating a preferences interface
For information about creating a preferences interface for your features, see Manual:Hooks/GetPreferences.