some User -> Profile cleanup to help in adapting the profile page action to show stuff for remote users. Subscriptions, groups, roles, etc are all on profiles now so go ahead and use em.
This commit is contained in:
@@ -473,6 +473,29 @@ class Profile extends Memcached_DataObject
|
||||
return $cnt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this profile subscribed to another profile?
|
||||
*
|
||||
* @param Profile $other
|
||||
* @return boolean
|
||||
*/
|
||||
function isSubscribed($other)
|
||||
{
|
||||
return Subscription::exists($this, $other);
|
||||
}
|
||||
|
||||
/**
|
||||
* Are these two profiles subscribed to each other?
|
||||
*
|
||||
* @param Profile $other
|
||||
* @return boolean
|
||||
*/
|
||||
function mutuallySubscribed($other)
|
||||
{
|
||||
return $this->isSubscribed($other) &&
|
||||
$other->isSubscribed($this);
|
||||
}
|
||||
|
||||
function hasFave($notice)
|
||||
{
|
||||
$cache = common_memcache();
|
||||
|
||||
Reference in New Issue
Block a user