Auth_PrefManager::getPref() – Get a preference.


require_once '/PrefManager.php';

mixed Auth_PrefManager::getPref ( string $user_id , string $pref_id , bool $showDefaults = true )


Retrieves the preference specified for a user, or, if returning default values is enabled, the default.


string $user_id

The user to get the preference for.

string $pref_id

The preference to get.

boolean $showDefaults

Should default values be searched (overrides the global setting).

Return value

returns The value if it's found, or NULL if it isn't.


No exceptions thrown.


This function can not be called statically.

Retrieves a default value. (Previous) Set the default value for a preference. (Next)
Last updated: Sat, 16 Feb 2019 — Download Documentation
Do you think that something on this page is wrong? Please file a bug report.
View this page in:
  • English

User Notes:

There are no user contributed notes for this page.