Add simpler delete preference for Profile and User
This commit is contained in:
parent
8d7230a2b9
commit
5653c25641
@ -1565,6 +1565,10 @@ class Profile extends Managed_DataObject
|
||||
return $this->getUser()->shortenLinks($text, $always);
|
||||
}
|
||||
|
||||
public function delPref($namespace, $topic) {
|
||||
return Profile_prefs::setData($this, $namespace, $topic, null);
|
||||
}
|
||||
|
||||
public function getPref($namespace, $topic, $default=null) {
|
||||
return Profile_prefs::getData($this, $namespace, $topic, $default);
|
||||
}
|
||||
|
@ -1007,6 +1007,11 @@ class User extends Managed_DataObject
|
||||
return $act;
|
||||
}
|
||||
|
||||
public function delPref($namespace, $topic)
|
||||
{
|
||||
return $this->getProfile()->delPref($namespace, $topic);
|
||||
}
|
||||
|
||||
public function getPref($namespace, $topic, $default=null)
|
||||
{
|
||||
return $this->getProfile()->getPref($namespace, $topic, $default);
|
||||
|
Loading…
Reference in New Issue
Block a user