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:
Brion Vibber
2010-11-15 15:32:57 -08:00
parent 227d4b6889
commit 0d0e51292d
4 changed files with 38 additions and 16 deletions

View File

@@ -84,7 +84,8 @@ class User extends Memcached_DataObject
function isSubscribed($other)
{
return Subscription::exists($this->getProfile(), $other);
$profile = $this->getProfile();
return $profile->isSubscribed($other);
}
// 'update' won't write key columns, so we have to do it ourselves.
@@ -418,8 +419,8 @@ class User extends Memcached_DataObject
function mutuallySubscribed($other)
{
return $this->isSubscribed($other) &&
$other->isSubscribed($this);
$profile = $this->getProfile();
return $profile->mutuallySubscribed($other);
}
function mutuallySubscribedUsers()