- return Profile_prefs::getData($this, $namespace, $topic, $default);
+ // If you want an exception to be thrown, call Profile_prefs::getData directly
+ try {
+ return Profile_prefs::getData($this, $namespace, $topic, $default);
+ } catch (NoResultException $e) {
+ return null;
+ }
+ }
+
+ // The same as getPref but will fall back to common_config value for the same namespace/topic
+ public function getConfigPref($namespace, $topic)
+ {
+ return Profile_prefs::getConfigData($this, $namespace, $topic);