Description
The $properties property should be an associative array, with the structure below. Any options not set will be set to the default.
- 'table'
The table to retrieve preferences from. [preferences]
- 'userColumn'
The field to use for matching user IDs. [user_id]
- 'nameColumn'
The field to use for matching preference names. [pref_name]
- 'valueColumn'
The field to retrieve preference values from. [pref_value]
- 'defaultUser'
The user ID to use for retrieving default values. [__default__]
- 'cacheName'
The key to use for the cache in $_SESSION. [prefsCache]
- 'useCache'
Should values be cached for later use. [true]
- 'serialize'
Should values be serialized before saving to the database, and unserialized on retrieval. [false]
Options: table: The table to get prefs from. [preferences] userColumn: The field name to search for userid's [user_id] nameColumn: The field name to search for preference names [pref_name] valueColumn: The field name to search for preference values [pref_value] defaultUser: The userid assigned to default values [__default__] cacheName: The name of cache in the session variable ($_SESSION[cacheName]) [prefsCache] useCache: Whether or not values should be cached. serialize: Should preference values be serialzed before saving?
Note
This function can not be called
statically.
Users with preferences created using Auth_PrefManager 1.0.4 or earlier shouldn't enable the serialize option, as it may result in data loss.