X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Foauthstore.php;h=b04bcbb8b29896a922ceb651587fccdb7f9d0f1d;hb=fae0f36b4d1e43e42637bced0b655ee6a25d6226;hp=d617a7df7e6216f52d72d0beec8892487256f94b;hpb=fe7848e8b87b6a3f44fc8b7a58f79812d197dec2;p=quix0rs-gnu-social.git diff --git a/lib/oauthstore.php b/lib/oauthstore.php index d617a7df7e..b04bcbb8b2 100644 --- a/lib/oauthstore.php +++ b/lib/oauthstore.php @@ -351,7 +351,7 @@ class StatusNetOAuthDataStore extends OAuthDataStore $author = User::staticGet('uri', $author_uri); } if (!$author) { - throw new Exception('No such user'); + throw new Exception('No such user.'); } common_log(LOG_DEBUG, print_r($author, true), __FILE__); @@ -407,7 +407,7 @@ class StatusNetOAuthDataStore extends OAuthDataStore $user = User::staticGet('uri', $uri); } if (!$user) { - throw new Exception('No such user'); + throw new Exception('No such user.'); } return $user; } @@ -462,6 +462,10 @@ class StatusNetOAuthDataStore extends OAuthDataStore $subscribed = $this->_getAnyProfile($subscribed_user_uri); $subscriber = $this->_getAnyProfile($subscriber_uri); + if (!$subscriber->hasRight(Right::SUBSCRIBE)) { + return _('You have been banned from subscribing.'); + } + $sub->subscribed = $subscribed->id; $sub->subscriber = $subscriber->id;