common_debug('stored request: '.print_r($omb,true), __FILE__);
-
common_remove_magic_from_request();
$req = OAuthRequest::from_request();
common_user_error(_('You can use the local subscription!'));
return;
}
-
+
common_debug('listenee: "'.$omb['listenee'].'"', __FILE__);
$user = User::staticGet('nickname', $omb['listenee']);
}
$other = User::staticGet('uri', $omb['listener']);
-
+
if ($other) {
common_user_error(_('You can use the local subscription!'));
return;
}
-
+
$fullname = $req->get_parameter('omb_listener_fullname');
$homepage = $req->get_parameter('omb_listener_homepage');
$bio = $req->get_parameter('omb_listener_bio');
}
}
+ 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;
}
# Notify user, if necessary
-
+
mail_subscribe_notify_profile($user, $profile);
-
+
# Clear the data
unset($_SESSION['oauth_authorization_request']);