diff --git a/classes/Remote_profile.php b/classes/Remote_profile.php index 9f7bfeadcc..0a1676a6a9 100644 --- a/classes/Remote_profile.php +++ b/classes/Remote_profile.php @@ -43,4 +43,14 @@ class Remote_profile extends Memcached_DataObject /* the code above is auto generated do not remove the tag below */ ###END_AUTOCODE + + function hasRight($right) + { + $profile = Profile::staticGet($this->id); + if ($profile) { + return $profile->hasright($right); + } else { + throw new Exception("Missing profile"); + } + } } diff --git a/lib/oauthstore.php b/lib/oauthstore.php index b04bcbb8b2..e34bf8a5ed 100644 --- a/lib/oauthstore.php +++ b/lib/oauthstore.php @@ -463,6 +463,7 @@ class StatusNetOAuthDataStore extends OAuthDataStore $subscriber = $this->_getAnyProfile($subscriber_uri); if (!$subscriber->hasRight(Right::SUBSCRIBE)) { + common_log(LOG_INFO, __METHOD__ . ": remote subscriber banned ($subscriber_uri subbing to $subscribed_user_uri)"); return _('You have been banned from subscribing.'); }