don't allow remote subscribes from blocked profiles

darcs-hash:20081208031532-5ed1f-6094c6425b73e45589de282fa482b912fb686fae.gz
This commit is contained in:
Evan Prodromou 2008-12-07 22:15:32 -05:00
parent ba8cc0df59
commit 5477532ea3

View File

@ -41,7 +41,6 @@ class FinishremotesubscribeAction extends Action {
common_debug('stored request: '.print_r($omb,true), __FILE__);
common_remove_magic_from_request();
$req = OAuthRequest::from_request();
@ -183,6 +182,11 @@ class FinishremotesubscribeAction extends Action {
}
}
if ($user->hasBlocked($remote->id)) {
$this->client_error(_('That user has blocked you from subscribing.'));
return;
}
$sub = new Subscription();
$sub->subscriber = $remote->id;
$sub->subscribed = $user->id;