We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit b5fd2a04 authored by mattl's avatar mattl

Shortcut to Profile_prefs get/set Data in Profile and User

parent b67a611c
......@@ -1570,4 +1570,12 @@ class Profile extends Managed_DataObject
{
return $this->getUser()->shortenLinks($text, $always);
}
public function getPref($namespace, $topic, $default=null) {
return Profile_prefs::getData($this, $namespace, $topic, $default);
}
public function setPref($namespace, $topic, $data) {
return Profile_prefs::setData($this, $namespace, $topic, $data);
}
}
......@@ -1007,4 +1007,14 @@ class User extends Managed_DataObject
$service->title);
return $act;
}
public function getPref($namespace, $topic, $default=null)
{
return $this->getProfile()->getPref($namespace, $topic, $default);
}
public function setPref($namespace, $topic, $data)
{
return $this->getProfile()->setPref($namespace, $topic, $data);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment